开发者

how to implement more then one facebook iLike button on one page?

If you have i.e. an onlineshop and you want your visitors to be able to like (with开发者_如何学Go 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜