views:

32

answers:

1

If you have i.e. an onlineshop and you want your visitors to be able to like (with fb-like-button) every product in your shop, how can you make this?

i mean, the like button should be corresponding to each produkt, to say: the product A is liked by 20, the product B is liked by 45 and product C by 13.

i only have found solutions, where you can like only one thing in one site ...

thanks to you all

+2  A: 

If you have a detail page for each product then you can easily add a like button to each page and use the open graph meta tags on that page to define the product that is being liked e.g.

<meta property="og:title" content="Product 1"/>
<meta property="og:site_name" content="My Site"/>
<meta property="og:image" content="product1_image_url"/>

If you then have a page with a list of products you can specify the url of the product page in the href attribute of the like button tag to make sure each like button relates to a separate product even though they are displayed on the same page.

Jon
aha, so every entity which can be liked has to have an unique url?and the button then gets the url... and there is the item, with the mentioned meta tags.what is faster for the implementing of the buttons. iframes or JS? or is it the same.
helle
Yes, from what I've seen the unique URL is important. I've only used the js method - I think iframes is easier to implement as you don't need to add the js api code but I think it has less features.
Jon
cool - that helped a lot!
helle