Facebook Social Plugins with IE8 [Fix]

Many people reported that my Facebook Social Plugins WordPress plugin didn’t work with Internet Explorer 8. However, it was working fine with IE8 on most blogs and I didn’t have enough information to be able to reproduce the problem. Today, while helping a friend with her blog, I finally came across the problem and was able to figure out how to fix it. Here is the explanation of the problem and what to do to fix it.

First, the problem occurs only when using the XFBML version of the plugin by providing an application ID. When using this, the plugin inserts non-standard Facebook-specific HTML tags. IE8 simply discards unknown tags, so the inserted code is simply discarded and the plugins can’t load. Other browsers apparently do not discard such tags (though they can report a warning).

Fortunately, HTML can be extended and the browser be instructed to recognize non-standard tags.  This is precisely what the plugin does. However, some themes miss a function call that is required for this to work. To fix it, log into your WordPress dashboard and go to Editor, under Appearance. On the right, there is a list of the files that make your theme. Click on Header (header.php). The code for that file loads. Near the top, there is a line that begins with <html. This is the line that will need to be edited.

If you see language_attributes in that line, then the code is already correct and the problem is something else. If however, you don’t see this, keep reading.

If you see dir=”ltr” on that line, remove it. Also remove lang=”en-US” (or another language code instead of en-US if your blog isn’t in US English) if it appears on that line. Next, add the following exactly as is at the end of the line, right before the >:

&lt;?php language_attributes(); ?&gt;

Make sure there is a space before that code. The final result may look like this, though it can differ too as themes are all different:

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &lt;?php language_attributes(); ?&gt;&gt;

Then click the Update File button at the bottom. Reload your blog in IE8. If everything went well, you should now see the Social Plugins. If it doesn’t work or if this is too complicated for you to do yourself, post a comment and I’ll see how I can help you.

Bookmark and Share
Posted in WordPress by Olivier at September 20th, 2010.
Tags: , , , , ,
  • Pingback: Tweets that mention Facebook Social Plugins with IE8 [Fix] - olussier.net -- Topsy.com

  • txhoudini

    Love the plugin. Easiest implementation of Facebook for WP out there! I am having the IE problem despite the <html tag being exactly like the above.

  • http://olussier.net/ Olivier

    Please give me your blog’s address so I can check what is wrong.

  • http://www.facebook.com/mootaz.dinana Mootaz Dinana

    Great plugin, but is it possible to integrate the comments with WP comments system?

  • http://www.facebook.com/manish.kataria Manish Kataria

    Thanks for the wonderful plugin, kindly guide me on how can I add facebook comments box after my all posts & articles.

  • http://www.facebook.com/vsandhu Vishal Sandhu

    Hi, is there a way i can remove the “like” button from the “comments” widget?

  • http://www.facebook.com/iakov.vokhmintsev Яков Вохминцев

    Hello!

    I’ve found a small bug in this plugin (like button uses get_permalink() function which gives somewhat unexpected result on the front page, i.e. pressing the button ‘likes’ last post in the loop instead of the main site itself). I could send you a diff if there’s an address to send it to.

  • http://olussier.net/ Olivier

    The button is part of the widget and Facebook doesn’t provide any parameter to toggle it so it doesn’t seem like there is a way to remove it.

  • http://olussier.net/ Olivier

    Thanks for reporting this. Will look into it and fix as soon as possible.

  • Savagetraveler

    I just downloaded your plugin for my site http://www.savagetraveler.com and I am unsure of how to get the like button to display at the top and bottom of my posts. I am new at this whole wordpress thing and am trying to figure out how to get the most out of this plugin also. What other features does it have and how do i control them? thanks

    The Savage Traveler

  • http://olussier.net/ Olivier

    It looks like you successfully installed the plugin as the Like button displays at the bottom of your posts. In your WordPress dashboard, look for “FB Social Plugins” on the left for the settings page where you can change whether you want the button to appear at the top, bottom or both. There are also a few other settings you can change there.

    Also, under “Appearence”, go to “Widgets”. There are 5 Facebook widgets you can add to your sidebar: FB Activity Feed, FB Comments, FB Like Box, FB Like Button and FB Recommendations.

    Visit http://olussier.net/demo/facebook-social-plugins/ for more details on each widget.

    Enjoy!

  • Milos

    Oliver, I have a problem. I’m using this plug for a long time. But when I instal other plug for commnets (my mistace :) plug just crack down. And when I put other ID… from other app, he doesnt work to… he just inst wolud not apear on page or post… :(

  • http://olussier.net/ Olivier

    I have also experienced this problem and it seems many people did too. It seems something went wrong on Facebook’s side and the likes counts were all set back to 0. Fortunately though, the actual likes are not lost, they just don’t show. Whenever someone likes an article, the likes reappear, so the best way to fix this for your own article is to click on “Like” for each of them and the counts should re-appear. If you don’t really want to “like” your articles, just hit Like and then Unlike and it’ll still work. You may need to refresh the page for the counts to re-appear.

    Hope this helps!

  • http://olussier.net/ Olivier

    I have also experienced this problem and it seems many people did too. It seems something went wrong on Facebook’s side and the likes counts were all set back to 0. Fortunately though, the actual likes are not lost, they just don’t show. Whenever someone likes an article, the likes reappear, so the best way to fix this for your own article is to click on “Like” for each of them and the counts should re-appear. If you don’t really want to “like” your articles, just hit Like and then Unlike and it’ll still work. You may need to refresh the page for the counts to re-appear.

    Hope this helps!

  • Miguel

    Hi, I write from Chile, I have a problem with the plugins: “Facebook Social Plugins 1.2.3″ to work on Opera 11, the problem does not happen in Chrome, Firefox, Safari or IE9, it is only with Opera.

    The problem is a space after the button is “Like”

    Reviewing your blog I realize that the problem happens also to understand a little better attached a picture.

    http://www.subirimagenes.com/imagen-facebooklikeerror-5779782.html

    I hope I can help. Greetings from Chile!

  • ed

    Hi Olivier! I installed FSP last night and can’t get the comments portion to work. I have the correct Facebook ID (I’ve actually tried 3) and nothing. However, when I remove the ID from the Settings, the Like button, and all associated “likes” appear. I’ve tried deactiving plugins and have deleted any other facebook plugin, yet the problem persists.

    Oddly enough, I tried putting the Comments widget in my sidebar and it worked…it just won’t work in the posts.

    The site I’m testing this on is http://elsbootcamp.com/blog

  • http://olussier.net/ Olivier

    Hello! Thanks for your interest. Unfortunately, this plugin doesn’t support adding the comments at the end of posts. It only supports using the comments plugin as a widget for your sidebar like the other plugins.

  • http://sardoniclee.com/ steve L

    hey olivier- longtime user of your great plugin. however, many posts ‘likes’ have suddenly gone to 0, and users are also getting the following error when trying to ‘like’ using the like button under a post: “You failed to provide a valid list of administators. You need to supply the administors using either a “fb:app_id” meta tag, or using a “fb:admins” meta tag to specify a comma-delimited list of Facebook users.” is there something i can do? thanks a lot for your help…
    the site is http://sardoniclee.com/

  • Alex

    Olivier, like many people have posted, thanks for a great plugin. It works great.

    I have one question. Is there a way to change the font color where for example on you page “Find Me on Facebook” and “olussier.net on Facebook”. I have researched it and it looks like it is going of my site to gather the .css?

  • Alex

    Olivier, like many people have posted, thanks for a great plugin. It works great.

    I have one question. Is there a way to change the font color where for example on you page “Find Me on Facebook” and “olussier.net on Facebook”. I have researched it and it looks like it is going of my site to gather the .css?

  • http://olussier.net/ Olivier

    The style of that text is defined by your CSS for widget titles. It is specific to your theme and unrelated to the plugin, so I cannot tell you exactly where it is defined. If you give me the link to your blog, I could help you find it if you want.

  • http://olussier.net/ Olivier

    The style of that text is defined by your CSS for widget titles. It is specific to your theme and unrelated to the plugin, so I cannot tell you exactly where it is defined. If you give me the link to your blog, I could help you find it if you want.

  • Markus

    Would you happen to know how to change the font for the FB Like Box? My background is grey making the dark blue and grey hard to read: http://www.cablenewsmustdie.com/

  • Mani

    Hey Oliver, hope all is well. I am using your FB plugin and it works great on Firefox but its completely messed on IE8, after reading your post on how to fix it, I couldnt fixt it, I couldnt find those lines that you were talking about in the hearder.php, so I just added the to it and made it look like how u said it should look like.
    It worked but to a certain extent and it had side effects on top of it. The footer was pushed over to the left side and the recommendations and activity widget just shrink!! its like the minimize and all you can see is just the header.

    This is the page if you want to look at it.
    http://nocturnalight.com/website/
    I will leave the plugins on until midnight and I guess ill take it out by then cause its not working out on IE8, again its works just fine with Firefox and the rest I believe)

    I would really appreciate it if you could help with this.

    Thanks
    Mani

  • http://www.discountsunglasseswholesale.com Fang

    Even though you enter the sunglasses hut is occasional, but you must love their oakley glasses. Here we provide you a wide selection of Tom Ford sunglasses, it’s a Professional sunglasses wholesale website.

  • Nigel Stockley

    Is there any way to permanently remove the Facebook plugin, for some reason everytime I switch from my Firefox browser, to IE8 to keeps trying to reload and everytime it apppears thet the Facebook plugin is stopping it.

  • GOKUL SARAVANAN

    Is there is any eay to solve my problem?
    I used Facebook plugin in site, if i tried to validate my site with markup Validation Service , It shows error in facebook plugin like

    element “fb:like-box” undefined
    there is no attribute “profile_id”there is no attribute “width”
    there is no attribute “connections”
    there is no attribute “stream”

    there is no attribute “header”

  • Matt Montag

    The Permalink Editor plugin by Fubra breaks FB Social Plugins. When it’s enabled, the Facebook permalinks seem to change so the Like counts are reset to zero. Please check that out, or let me know if you don’t have time, I’d love to help. 

  • Scott

    How do I disable this on all ‘attachment’ pages?

  • Ollie

    Hi, thank you for the plugin. When i like a page on my site however, it is displayed on Facebook with a faulty excerpt, there being no subheading and no site title. Sometimes it includes odd symbols, I want to be able to manage the like presentation so that it looks neat when someone likes a page on FB – how can I do this? Thanks-you. My site is http://www.libertymagazine.co.uk 

  • http://profile.yahoo.com/YT53ONQEZIPJRYG4EXAUA52E2I Eneas

    Hi! I have question about you FB Like plugin for WP. Since I installed those, when I paste a link in FB the images of the link do not appear anymore. The only way I can make them appear is to manually “debug” the link first here:https://developers.facebook.com/tools/debug 

    Any suggestions on how to fix that?

    My site is http://www.hacer.org/latam/

    Thank you!

  • http://www.cardeologist.com Steve Patterson

    I am trying to get recent Facebook Comments to load as a widget on my blog on the sidebar, like you can do with the recent comments via WordPress. How can I implement that. Thanks. (www.cardeologist.com)

  • http://livechat.comm100.com/wordpress-chat-plugin.aspx free wordpress chat

    Facebook social plugins are used to integrate a WordPress comment system blog. IE8 does not support this plugin. Thanks for giving such a nice explanation about the fix IE8 problem.

  • Stjmurphy

    I am having similar issues.  Can you help me as well?

  • http://www.thepensivewhimsy.com/ Tara

    This may have already been discussed..but does this plug-in work on a wordpress.com blog or does it have to be wordpress.org?  I have a .com blog and I can’t find the “plug-ins” menu.  Alas, I am new.. thank you for any help you can give.. :)