Facebook 点赞按钮计数根本没有更新
我的网站上的 facebook like 按钮有问题。我已经实现了这一切,我可以点击“喜欢”,它就会出现在我的墙上(并且在网站上,计数会弹出显示“1”),但计数永远不会更新。如果我刷新页面,它只会再次显示“喜欢”按钮(无计数),如果我使用新帐户登录 Facebook 并再次单击“喜欢”,它只会再次显示“1”。
我网站上的示例页面:
fql 读数(观看撇号在这里转义,复制并粘贴不要只是单击):
https://api.facebook.com/method/fql.query?query=select%20total_count,like_count,comment_count,share_count,click_count%20from%20link_stat%20where%20url='http:// www.makemeacocktail.com/recipe/6741/'&format=json
正在使用的 FB XML:
<fb:like href="http://www.makemeacocktail.com/recipe/6741/" send="false" layout="button_count" width="50" show_faces="false" font="arial"></fb:like>
其他 facebook 想法等:
我在头部中有 facebook 开放图元数据
对 facebook 的 js 调用发生在最后一件事中我的页面,在 FBML 之后:
<script src="http://connect.facebook.net/en_US/all.js#appId=187430904631019&xfbml=1"></script>
<script>
FB.init({
appId : '187430904631019',
status : true,
cookie : true,
xfbml : true
});
</script>
我还得到了 facebook 页面,如我页面底部所示:
<div id="fb-root"></div><fb:like-box href="http://www.facebook.com/makemeacocktail" width="292" show_faces="false" stream="false" header="true"></fb:like-box>
这就是 fb 根目录所在的位置。
我唯一想到的是 fb-root 之前没有在 facebook like 按钮旁边,以及两个 facebook like 按钮发生冲突或其他什么?不过,我只在底部调用 facebook js 一次。
任何想法都有帮助等,非常感谢。这很奇怪,因为它会到我的墙上,但网站上的按钮没有监听!
多谢
I'm having a problem with the good ol' facebook like button on my site. I've implemented it all, I can click on "like" and it appears on my wall (and on the site the count pops up to say "1"), but the count never updates. If I refresh the page it just shows the "like" button again (no count), and if I log in to facebook with a new account and click on like again, it just says "1" again.
An example page on my site:
The fql readout (watch the apostrophe escape here, copy and paste dont just click):
https://api.facebook.com/method/fql.query?query=select%20total_count,like_count,comment_count,share_count,click_count%20from%20link_stat%20where%20url='http://www.makemeacocktail.com/recipe/6741/'&format=json
The FB XML that is being used:
<fb:like href="http://www.makemeacocktail.com/recipe/6741/" send="false" layout="button_count" width="50" show_faces="false" font="arial"></fb:like>
Other facebook thoughts etc:
I've got the facebook open graph meta data in the head
The js call to facebook happens as the last thing on my page, after the FBML:
<script src="http://connect.facebook.net/en_US/all.js#appId=187430904631019&xfbml=1"></script>
<script>
FB.init({
appId : '187430904631019',
status : true,
cookie : true,
xfbml : true
});
</script>
I've also got the facebook page like at the bottom of my page:
<div id="fb-root"></div><fb:like-box href="http://www.facebook.com/makemeacocktail" width="292" show_faces="false" stream="false" header="true"></fb:like-box>
Which is where the fb-root is.
My only thought it something about fb-root not being next to the facebook like button earlier up, and a conflict of two facebook like buttons or something? I;m only calling the facebook js once though, right at the bottom.
Any thoughts help etc much appreciated. It is weird because it it going to my wall, but the button on the site isn't listening!
Thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从您的点赞按钮发送到 Facebook 的请求中得到此信息:
因此,您需要将开发人员应用程序中的应用程序的基域更改为 makemeacocktail.com。如果这不是问题,请尝试删除 fb:app_id 打开图形标签,或改用 fb:admins 标签。祝你好运,希望这有帮助。
Got this from the request your like button sends to facebook:
So, you need to change the base domain for your application in the developers application to makemeacocktail.com. If that is not the problem try removing the fb:app_id open graph tag, or use the fb:admins tag instead. Good luck, hope this helps.