Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Load the Facebook API
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_APP_ID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Browser-specific hacks to make FB Connect more reliable
$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase());
if ($.browser.chrome || $.browser.msie) {
FB.XD._origin = window.location.protocol + "//" + document.domain + "/" + FB.guid();
FB.XD.Flash.init();
FB.XD._transport = "flash";
} else if ($.browser.opera) {
FB.XD._transport = "fragment";
FB.XD.Fragment._channelUrl = window.location.protocol + "//" + window.location.host + "/";
}
};
(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
@sjawaji

This comment has been minimized.

Copy link

commented Nov 3, 2011

Same here. Window still hangs on. Any solutions please?

@jhurliman

This comment has been minimized.

Copy link
Owner Author

commented Nov 3, 2011

@jhurliman

This comment has been minimized.

Copy link
Owner Author

commented Nov 21, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.