Mobile websites: Facebook Like button
What method are you using f开发者_如何学Pythonor 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
Recently announced:
https://developers.facebook.com/blog/post/2012/06/20/bringing-like-to-mobile/
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.
精彩评论