Html 类似Facebook的按钮:所有页面都显示';0喜欢';或';{总数}喜欢';
我用Facebook的like按钮得到了一些奇怪的结果(对我来说很奇怪)我在我的网站的几个页面上都有like按钮,但是每个按钮上显示的like数量总是相同的-如果页面不喜欢,则为0,如果页面一直喜欢,则显示网站本身的总喜欢数量 在用户仪表板上,我允许他们“喜欢”我的Facebook页面,以下是我使用的iframe:Html 类似Facebook的按钮:所有页面都显示';0喜欢';或';{总数}喜欢';,html,facebook,facebook-like,Html,Facebook,Facebook Like,我用Facebook的like按钮得到了一些奇怪的结果(对我来说很奇怪)我在我的网站的几个页面上都有like按钮,但是每个按钮上显示的like数量总是相同的-如果页面不喜欢,则为0,如果页面一直喜欢,则显示网站本身的总喜欢数量 在用户仪表板上,我允许他们“喜欢”我的Facebook页面,以下是我使用的iframe: <iframe src="//www.facebook.com/plugins/like.php? href=http://www.facebook.com/myfaceboo
<iframe src="//www.facebook.com/plugins/like.php?
href=http://www.facebook.com/myfacebookpage&send=false&
layout=button_count&width=100&show_faces=true&action=like&
colorscheme=light&font&height=21&appId={MY ID HERE}"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px;
height:20px;" allowtransparency="true"></iframe>
然后在用户的个人资料页面上,我允许访问者喜欢每个个人资料页面
有关网页:
有关网页:
正如你所看到的,我正在为每一个传递不同的href值,所以就我所能看到的(和在文档中阅读的)而言,我做的是正确的。。。几个小时来一直在研究这个问题,毫无乐趣。有人遇到过类似的吗?Facebook页面并不真正使用“like plugin”。在处理页面时,您需要使用“likebox插件”。它比类似的插件有更多的功能。查看:找到了答案
在开放图中,元数据og:url始终设置为
<iframe src="//www.facebook.com/plugins/like.php?
href=http%3A%2F%2Fmywebsite.com%2Fjohn&send=false&layout=button_count
&width=100&show_faces=true&action=like&colorscheme=light&
font&height=21&appId={MY ID HERE}" scrolling="no" frameborder="0"
style="border:none; overflow:hidden; width:100px; height:20px;"
allowtransparency="true"></iframe>
<iframe src="//www.facebook.com/plugins/like.php?
href=http%3A%2F%2Fmywebsite.com%2Fbilly&send=false&layout=button_count&
width=100&show_faces=true&action=like&colorscheme=light&font&
height=21&appId={MY ID HERE}" scrolling="no" frameborder="0" style="border:none;
overflow:hidden; width:100px; height:20px;"` allowtransparency="true"></iframe>