04
May
2010
Use XFBML tags instead of Iframes with new Facebook “Like” buttons
If you use XFBML tags in your website versus the iframe option, you can have much more control over how they act and also iFrames are not always compatible with browsers
After several hours of trying to figure out how to get these new Facebook Social Plug-ins to work in both Firefox and Internet Explorer, I figured it out.
You must include the code below in between your <HEAD></HEAD> tags.
<html xmlns=”http://www.w3.org/1999/xhtml” xmlns:fb=”http://www.facebook.com/2008/fbml”>
<script src=”/xfbml/xfbml.js”></script>
Let us know if you get stuck and we can help you implement it into your site.
Did you enjoy this article?
|
![]() |


























Thanks for clearing that up. I'm guessing that the XFBML version is the newer format to use?
- spam
- offensive
- disagree
- off topic
LikeXFBML is meant to work on more browsers but I have just found that the XFBML version does not work on older versions of Internet Explorer whereas Iframe does so will be switching ours to iframe.
- spam
- offensive
- disagree
- off topic
LikeI have been trying to implement the like button for a while, with limited success. Using the iframe, does not allow the use of the send button, and its overall usefullness and automation is limited. Looking the what type of page it is ( ), it appears that is is above the head, not in the head. The meta tage go in the head. I think most people will need to have the site developer inplement these tages above the head, and most users could probably add the meta tags that are required in the head. If the page type specified will work if put in the head, that would be nice... I still have not had success with that. Looking at the source code for this page, the face type is also above the head, not in the head,.
- spam
- offensive
- disagree
- off topic
LikeTry this page for full details on install with Send button. http://developers.facebook.com/docs/reference/plugins/like/
- spam
- offensive
- disagree
- off topic
LikeThanks for the reply!
- spam
- offensive
- disagree
- off topic
LikeHi, will it be possible to hide something from within a blog post in blogger? Not from the template but for each entry. thanks
- spam
- offensive
- disagree
- off topic
LikeThis is not possible in Blogger.
- spam
- offensive
- disagree
- off topic
LikeJarrett - will the March 1st changes I've been reading about effect this code? sorry for the duplicate, the Disqus system didn't take the 1st time around.
- spam
- offensive
- disagree
- off topic
LikeThis will not effect it at all.
- spam
- offensive
- disagree
- off topic
LikeJarrett - will the changes coming March 1st effect this code?
- spam
- offensive
- disagree
- off topic
LikePasted the above code into my Joomla index.php file between the head tags and am having no luck. Any thoughts? Thank you in advance, Donna
- spam
- offensive
- disagree
- off topic
LikePut it in your header file not the index file.
- spam
- offensive
- disagree
- off topic
LikePlease view this post to answer your question. http://orangecountycustomwebsitedesign.com/facebook-fan-pages-hide-certain-content-from-non-fans/
- spam
- offensive
- disagree
- off topic
LikeI am working with DreamWeaver CS5. HTML, and I cannot get the Like button to drop into my page. Quite frankly I do not have the desire to study this so I am hoping you can just explain this better to me. I dont really care about the iframe or XFBML, I just want the button that links the website with the FB. When i drop the iframe I get a giant green block with no writing. When I drop the XFBML i get literally no change whatsoever. Am I missing something here?
- spam
- offensive
- disagree
- off topic
LikeThis post contains absolutely no useful information - what on Earth are you trying to say? There aren't even any links to useful resources.
- spam
- offensive
- disagree
- off topic
LikeWhat exactly are you looking for?
- spam
- offensive
- disagree
- off topic
LikeWhat does Youtube use for its comment system? There is no page refresh when commenting or navigating through the comments.
- spam
- offensive
- disagree
- off topic
LikeNot sure what they use.
- spam
- offensive
- disagree
- off topic
LikeI don't understand how we are supposed to "bellow" the code between the tags. I spent hours reading through other documentation available online about "bellows" (ex, http://en.wikipedia.org/wiki/Bellows). Unfortunately I was fruitless in my search. On a more serious note. This is some good information. :)
- spam
- offensive
- disagree
- off topic
LikeThanks for the sharp eye and nice comment. Hope you share with your friends.
- spam
- offensive
- disagree
- off topic
Like