I'm about to incorporate Like buttons into my web site - it'll be the first time I've incorporated Facebook fubctionality - and would like some guidance on whether to use the XFBML option or the Iframe option. It seems as though XFBML offers more flexibilty for the future, but a) are there any disadvantages to this approach, and b) is the HTML5 compliant version better still? Thanks.
相关问题
- Options call for meta before REST API call
- What is the benefit of turning Generate Serializat
- My Google chrome doesn't show OPTIONS requests
- Dynamic options dialog (using reflection)
- What does --oneline in git diff?
相关文章
- R using temporary options settings inside a functi
- More GCC link time issues: undefined reference to
- Add new values to a attribute option in magento
- Can OptionParser skip unknown options, to be proce
- How to implement options hashes in Ruby?
- Adding optgroups to select using javascript dynami
- How do I show the References folder in Solution Ex
- How to change Options menu dots color? [duplicate]
If you want it quick and non-intrusive code in your website use IFrame, but the SEO could be affected.
If you want to add more features use XFBML or HTML5. But that's required use ncluding the JS SDK, but IMHO it will be better in a long term
FBML is going away in the next 6 months, see https://developers.facebook.com/docs/reference/fbml/, so that won't be a good long-term option. (FBML and XFBML are not the same.) XFBML is a valid way to do it, but the syntax takes some getting used to. Requires running the parsing code on your webpage, not really a big deal, but it is to some web site owners.
HTML5 is the way I do it, but requires running the parsing code on your webpage, not really a big deal, but it is to some web site owners.
The iFrame option works great, but as with any other way, always be sure to check Facebook to see if they're going to deprecate it.
XFBML is not going away and is different than FBML. I too was confused about this since all of their social-plugin example code still gives you the xfbml option.
See https://developers.facebook.com/blog/post/568/
HTML5 / XFBML / IFRAME? I don't think it makes much difference. Once the facebook api is initialized all of them end up as iframes. You can see this if you inspect the element with firebug or chrome. Maybe not as standards-compliant, the xfbml version is probably more peformant since getting a bunch of elements by tagname is faster than by classname.
Once caveat with the HTML5 version is that if you plan to subscribe to the plugin's events, you'll need to add a channel file when you initialize the api. The xfbml versions work fine without it (at least as of this writing).