问题描述
最近切换到XFBML以提高页面效率。但是,我们注意到当我们开始使用fb时:喜欢与旧的iframe相比,新的Facebook Likes不再录制!
Recently switched to XFBML to make our page more efficient. However, we noticed that when we started using fb:like vs. the old iframe new Facebook Likes are no longer recording!
想要对此有所了解。 Facebook调试器没有返回错误代码,因此我们对导致此问题的原因一无所知!
Wanted to get some insight on this. The Facebook debugger is not returning error codes so we're in the dark about what's causing this!
代码参考,但所有内容都会检出:
Code reference, everything checks out though:
<fb:like href="http://www.example.com/" send="false" layout="button_count" show_faces="false" width="90" font="arial" action="like"></fb:like>
CloudFlare:我注意到CloudFlare有时会偏离Facebook的流量debug / linter并想知道这是否相关?以下是您可以尝试的示例请求:
CloudFlare: I did notice that CloudFlare was sometimes deflecting traffic from the Facebook debug/linter and wanted to know if that could be related? Here's an example request you can try: http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.vancitybuzz.com%2F2012%2F01%2Fwhat-lurks-below-british-columbia%2F
感谢您的帮助!
更新:此问题发生在喜欢(HTML5等)的多种方法上
Update: this issue is occurring on multiple methods for "like" (HTML5, etc.)
推荐答案
需要一个配方来计算这个,但如果你有相同的症状(CloudFlare,Wordpress网站,Facebook喜欢按钮不能同时使用xfbml和html5格式),那么这就是我的建议:
It took a recipe to figure this one out, but if you have the same symptoms (CloudFlare, Wordpress site, Facebook "Like" button not working in both xfbml and html5 formats) then here is what I recommend:
- 联系CloudFlare并请求更新所有白名单IP
- 删除CloudFlare设置以检查浏览器完整性
- 清除和/或更改所有缓存控制标头
- 等待广告所以CF服务器有机会传播
- 对丢失计数的喜欢执行linter / debugger重置:
- 将您的Facebook ID添加到元标记
- 喜欢想要恢复活力的项目
- 再等一天让Facebook服务器传播并进行相应的同步
- Contact CloudFlare and request an update of all Whitelisted IPs
- Remove CloudFlare setting to check for browser integrity
- Clear and/or change all cache-control headers
- Wait a day so CF servers have a chance to propogate
- Perform a linter/debugger reset on "likes" that lost count: http://developers.facebook.com/tools/debug
- Add your Facebook ID to the meta tag
- Like items you want "rejuvenated"
- Wait one more day for Facebook servers to propagate and sync accordingly
关键在于给出问题时间,因为CloudFlare和Facebook都有大量需要同步机制的服务器,可能需要数天才能赶上。
The key was giving the problem time, since both CloudFlare and Facebook have vast servers that require syncing mechanisms, and may take days to catch up.
这篇关于新的xfbml“喜欢”按钮+ CloudFlare 503错误导致计数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!