facebook share - populate description text

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ninethousandfeet
Forum Contributor
Posts: 130
Joined: Tue Mar 10, 2009 4:56 pm

facebook share - populate description text

Post by ninethousandfeet »

hi,

i'm trying to find out if anyone knows how to populate the description part of the text when a user tries to share something with a facebook share button. for example, users submit comments on my site and each comment has a facebook share button next to it. if someone wants to share a comment, i want that comment to appear as the description text in the facebook share dialog box... is this possible? right now, the meta description is what is showing up and it kind of defeats the purpose of sharing the comment b/c the user then has to type it in manually.

Code: Select all

 
<a href="http://www.facebook.com/sharer.php
?u=http://www.mysite.com/<?php echo $commentInfo['username'];?>&t=<?php echo $commentInfo['comment'];?>" title="share this on facebook"><img src="/myfiles/images/facebook.png" /></a>
 
thank you!
brad
Post Reply