tags:

views:

28

answers:

1

I'm trying to embed the Facebook Like button on a web site. The URL of the item I am trying to allow the user to "like" is an individual Facebook post on a Page's wall.

I'm using a simple FBML implementation of the Like button like so:

<fb:like href="http://www.facebook.com/[PAGENAME]?v=wall&amp;story_fbid=[ID OF THE POST]" layout="button_count"></fb:like>

The like button works, but when it is clicked, the user is actually liking the PAGE, not the individual post.

Any help would be much appreciated. I've tried various formats for the URL, but so far have not been able to make it work.

Thanks!

+1  A: 

What you are trying to do is not possible. You can only 'like' things that have a unique page to display them. The url you have ?v=wall&story_fbid=[ID OF THE POST] is just a 'helper' url for facebook. It takes you to the http://www.facebook.com/[PAGENAME] url and Facebook will treat this url the same as the page.

It is a bit confusing because you could do something like you are talking about off of facebook, but the like inside of Facebook isn't really the same as what the like button's are doing. The like buttons are using the Open Graph protocol. Content on facebook.com doesn't play by the same rules.

In short, likes for "facebook generated" content inside of facebook can only be liked inside of facebook.

Check out this article for more information on some of the things you can do with the like button inside facebook: http://developers.facebook.com/blog/post/407

Nathan Totten

related questions