Reputation: 27058
I have a table list of products generated in PHP.
The list contains: title | description | price | like_button
the Like button that I use is:
<iframe src="http://www.facebook.com/plugins/like.php?app_id=103750869718158&href= echo "http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"].'; &send=false&layout=button_count&width=100&show_faces=false&action=like&colorscheme=light&font=arial&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
The list gets generated with, lets say 20 products and respectively 20 likes.
The problem occurs when I click on one Like button, all other like buttons get activated and I would like them to be independent one from each other.
here is an idea
All help or ideas are appreciated, Thanks
Upvotes: 0
Views: 782
Reputation: 219047
Take a look at the page you're using as an example (not a marketing video of the page, but the actual page itself):
<fb:like width="90" layout="button_count" href="http://r.levi.com/product/index.jsp?productId=3672714&r=&c=3" font="arial" ref="FamilyLike:3515596"></fb:like>
I'm not up to date on Facebook's FBML (XFBML?) markup syntax, but it looks like the key here is the href
which is unique per product. That ref
attribute also appears to be useful.
I think the biggest difference to notice here is that the desired functionality is implemented using the Facebook markup and JavaScript SDK, as opposed to the simpler iframe
method. The additional functionality requires a bit of additional development work, though not much.
Upvotes: 2