移动网站:Facebook 点赞按钮
您使用什么方法来实现移动网站的 Facebook Like 按钮功能?
在桌面网站上,我使用了以下内容:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="websiteurl" show_faces="true" layout="button_count"></fb:like>
但是,这确实依赖于加载的 JavaScript 库,这对于某些移动设备来说可能会出现问题,特别是因为 Facebook JavaScript 库非常大,而且我们正在努力保持大小将网站的影响降到最低。
另一种选择是使用 iframe 功能,这似乎是处理它的最佳方法,但是,某些移动设备不支持 iframe。
我们支持以下内容: iPhone 安卓 黑莓 Windows Mobile
因此希望尽可能多地瞄准这些设备。我开始认为 iframe 是处理它的最佳方式,但不确定上面的设备对它的全面支持程度如何。
谢谢大家
What method are you using for the Facebook Like button functionality for your mobile web sites?
On desktop sites, I've used the following:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="websiteurl" show_faces="true" layout="button_count"></fb:like>
However, this does rely on JavaScript libraries being loaded, which can be problematic for some mobile devices, especially since the Facebook JavaScript library is pretty big, and we're trying to keep the size of the site to a minimum.
The other option is to use an the iframe functionality, which seems to be the best way to handle it, however, some mobile devices don't support iframes.
We're supporting the following:
iPhone
Android
Blackberry
Windows Mobile
So looking to target as many of those devices as possible. I'm beginning to think the iframe is the best way to handle it, but am not sure how supported it is across the board for the devices above.
Thanks all
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最近宣布:
https://developers.facebook .com/blog/post/2012/06/20/bringing-like-to-mobile/
Recently announced:
https://developers.facebook.com/blog/post/2012/06/20/bringing-like-to-mobile/
不幸的是,目前还没有一个很好的方法来做到这一点。 Facebook 正在研究它,但目前还没有推出时间表。
There is unfortunately not a great way to do this at the moment. Facebook is working on it, but there is not yet a timetable for launch.