【发布时间】:2012-03-02 22:31:44
【问题描述】:
我在 Facebook 的点赞按钮上得到了一些奇怪的结果(对我来说还是很奇怪) 我在我的网站的几个页面上都有点赞按钮,但每个按钮上显示的点赞数始终相同 - 如果页面不喜欢,如果页面喜欢,则显示网站本身的喜欢总数。
在用户仪表板上,我允许他们“喜欢”我的 Facebook 页面,这是我使用的 iframe:
<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>
然后在用户的个人资料页面上,我允许访问者喜欢每个个人资料页面。
对于页面http://mywebsite.com/john:
<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>
对于页面http://mywebsite.com/billy:
<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>
正如您所看到的,我为每个传递了不同的 href 值,所以据我所知(并在文档中阅读)我做得正确......一直在研究这个几个小时,没有任何乐趣。有人遇到过类似的吗?
【问题讨论】:
标签: html facebook facebook-like