Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jhurliman
Created June 8, 2011 00:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhurliman/1013530 to your computer and use it in GitHub Desktop.
Save jhurliman/1013530 to your computer and use it in GitHub Desktop.
// 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
Copy link

sjawaji commented Nov 3, 2011

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

@jhurliman
Copy link
Author

jhurliman commented Nov 3, 2011 via email

@jhurliman
Copy link
Author

jhurliman commented Nov 21, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment