Skip to content Skip to sidebar Skip to footer

Facebook Javascript Sdk Fb_xd_fragment?

I am using the facebook javascript sdk to embed a like button in my page. What is fb_xd_fragment? I see it appends to the end of my url like http://www.example.com/controller/?fb_x

Solution 1:

After many weeks of trying to find a solution it looks like what is needed is a custom channel url as mentioned here:

http://developers.facebook.com/docs/reference/javascript/FB.init

All I did was create the channel.html file containing this single line:

<scriptsrc="http://connect.facebook.net/en_US/all.js"></script>

Then I added the channelUrl : line so the final result looks like this:

<divid="fb-root"></div><script>window.fbAsyncInit = function() {
     FB.init({
       appId  : 'MY APP ID',
       status : true, // check login status
       cookie : true, // enable cookies to allow the server to access the session
       xfbml  : true,  // parse XFBML
      channelUrl  : 'http://www.example.com/channel.html'// custom channel
     });   }; 

   (function() {
     var e = document.createElement('script');
     e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
     e.async = true;
     document.getElementById('fb-root').appendChild(e);
 }());</script>

Make sure to add a comma after xfbml : true if it was your last line. I'm not familiar with Javascript so I don't know if I'm taking full advantage of this but I know it prevents the fb_xd_fragment issue and allows FB comments in IE. As far as I can tell, this is the ONLY solution available online. Any further tweaks are welcome.

Solution 2:

Solved with the iframe like button.

Solution 3:

Solution 4:

a1anm's link is good for cleaning up the mess that this causes, but there's a way to prevent it from happening.

Set 'channelUrl' to a locally hosted channel page. See http://threebrothers.org/brendan/blog/facebook-connect-ie-fb_xd_fragment-iframe/ for details.

Solution 5:

Post a Comment for "Facebook Javascript Sdk Fb_xd_fragment?"