我找到了多个按钮的一些解决方案,但是它们引用的是不同的页面,并且没有图片.谢谢! PS:一个小小的工作示例将是一个很好的例子@DMCS说(请参阅评论),这是不可能的.当我为第二个产品www.xyz.com/index2.html创建一个虚拟页面并将其重定向到www.xyz.com/index1.html页面时,它会工作吗?在这种情况下,我会有两页吗?解决方案是可以的,您需要创建与主页上的按钮一样多的虚拟页面.每个页面都包含您需要的所有OG标签,包括描述和图像.然后,您可以使用重定向将用户带回到带有按钮的页面.使用 facebook类似按钮工具使用网址创建按钮每个伪页面的数量.这是一个虚拟页面示例:-<html xmlns="http://www.w3.org/1999/xhtml" ><head><title>This is a dummy page to hold the OG tags</title><meta property="og:title" content="This is the text the like button will show in FB when liked"/><meta property="og:site_name" content="the site name shown, the from name in FB"/><meta property="og:url" content="http://www,yoursite.com/dummp_01.html" /><meta property="og:image" content="http://www,yoursite.com/dummyimage01.jpg" /><meta http-equiv="refresh" content="0;url=http://www.redirect_to_url_that_has_all_the_like_buttons.com"></head><body></body></html>I have two different products "Prod_A" and "Prod_B" on the same page, saywww.xyz.com/index1.htmlOn this page are two images for these products and small descriptions.I need two like buttons for both products, both like buttons should refer to the page where they are located ( www.xyz.com/index1.html ), but both buttons should have different og:images and descriptions.I have found some solutions for multiple buttons, but they refer to different pages and don't have pictures included.thanks!PS:A small working example would be greateEdit:@DMCS said (see comment) that this is not possible. would it work, when I create a dummy page for the second product www.xyz.com/index2.html which would redirect to the page www.xyz.com/index1.html?I this case I would have two pages is it then possible? 解决方案 Yes this is possible, you need to create as many dummy pages as you have like buttons on your main page. Each of these pages includes all the OG tags you need including descriptions and images. You then use a redirect to take the user back to the page with the buttons.Use the facebook like button tool to create the buttons using the url of each dummy page. Here's an example dummy page:-<html xmlns="http://www.w3.org/1999/xhtml" ><head><title>This is a dummy page to hold the OG tags</title><meta property="og:title" content="This is the text the like button will show in FB when liked"/><meta property="og:site_name" content="the site name shown, the from name in FB"/><meta property="og:url" content="http://www,yoursite.com/dummp_01.html" /><meta property="og:image" content="http://www,yoursite.com/dummyimage01.jpg" /><meta http-equiv="refresh" content="0;url=http://www.redirect_to_url_that_has_all_the_like_buttons.com"></head><body></body></html> 这篇关于同一页面上的两个类似Facebook的按钮,带有两个不同的缩略图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-26 20:51