Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top