Sunday, October 31, 2010

fb_xd_fragment Bug Workaround

This post isn't meant for collectors on Colnect but is rather a technical post regarding Facebook integrations with a website.

Facebook "Like" button gets broken on IE when using the new Facebook API?
Your server gets weird requests with fb_xd_fragment in the URL?

This is a Facebook bug with the following quick solution:

1/ Change your FB.init to the following

FB.init({appId: appId, status: true, cookie: true, xfbml: true, channelUrl: ''});
// ^ channel URL above used to workaround fb_xd_fragment bug

2/ Create the static file for with the following content:
<script src=""></script>

IMPORTANT NOTE: ensure channel.html has proper expiry headers sent, otherwise it might slow down user experience and overload your server.


  1. dont know why this not work on my case .. test on IE7 and 8
    other browser or other version work
    curent i had to swich to iframe likeit version
    but lossing people share the link to the fb

    any other fix ..
    thinking ab: use java script detect IE then write the iframe version other will be normal
    i dont know about script so anyone help ?

  2. I don't even have the FB.Init you mention because I'm just inserting the like box and like button. What should I do in this case?

  3. Am I to assume that you remove the original line of code where you included the FB connect script before? Could u please detail how to do the expiry headers thing as well? Thanks

  4. How does channel Url method work? Does it prevent the browser from creating a duplicate copy of the page or does it handles the duplicate requests?

  5. More details how to do this for us non developers would be great!

  6. The above instructions are a fix for developers. If you are trying to access a website that has the problem, your solution is using a different browser, other than IE.

    Or I suppose you could play the good samaritan and email this article to the site's web developers.


We welcome comments to our blog post but MANUALLY verify each comment. Spam comments will be reported. When asking for an answer on anything Colnect related, please use Colnect's forums. Thanks and happy Colnecting :)

Link and Search

Did you like reading it? Stay in the loop via RSS. Thanks :)