Search code examples
jqueryfacebookfacebook-likefacebook-wall

How to like a specific article on a page where there is several articles?


I got a page where I want the user to like a specific article of the page, each article has an id/description/title and I would like tu link a like button to it. Thus, this like button would be able to make the user share this article on his wall.

So when it is about liking a single page/domain I know how to do, but for a singular article ... so yeah, the page comes with 12 articles, shown with a JQuery slideshow from jquery tools . This one : http://flowplayer.org/tools/demos/scrollable/site-navigation.html

I saw several subject there, but none really help me ..

Thanks


Solution

  • You need to have a link for every article. Otherwise it will not work.

    Since you have a jquery page with all content on one page, I see where you problem is. You need to create a "routing" script: page.php?article=42

    For every article you show the same page but with different tags for name and images:

    <meta property="og:url" content="http://mypage.de/myproduct/myproductkey"/>
    <meta property="og:title" content="Myproduct Description"/>
    

    See http://ogp.me/ for more. Also add some javascript the the page shows the right article.

    You can test it with: https://developers.facebook.com/tools/debug