Search code examples
facebookfacebook-likecustomizationsocial-networkingfacebook-social-plugins

Set parameters of Facebook Like plugin to send and share customized data


I've implemented a Facebook Like plugin on a XHTML website (can't update the doctype to html5). Say each "post" have a Like button.

I want to create a page with a selection of "posts" and each one will have a Like button.

2 questions:

  • Is it possible to share the information of a post when a user clic on a like in this page? Obviously, I can't use the open graph meta data because it's page related, not post related. I would like the title, the photo and a short description shared on the facebook user account.

  • Is it possible to know/retrieve the list of Facebook users who "liked" a particular "post"? Edit: The answer is no.

Thank you for your answers or advices !


Solution

  • If I understand correctly the question is how to add like button for individual articles into a page which has a list of multiple articles.

    Use the URL of the individual blog entry in the Like button code. For example if using HTML5 version of Like button then something like:

    <div class="fb-like" data-href="http://www.example.com/blog/1" data-send="false" data-width="450" data-show-faces="false"></div>
    <div class="fb-like" data-href="http://www.example.com/blog/2" data-send="false" data-width="450" data-show-faces="false"></div>
    

    Or if using XFMBL version then:

    <fb:like href="http://www.example.com/blog/1" send="false" width="450" show_faces="false"></fb:like>
    <fb:like href="http://www.example.com/blog/2" send="false" width="450" show_faces="false"></fb:like>