Skip to content

Instantly share code, notes, and snippets.

@jhurliman
Created June 8, 2011 00:19
Show Gist options
  • Select an option

  • Save jhurliman/1013530 to your computer and use it in GitHub Desktop.

Select an option

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

sjawaji commented Nov 3, 2011

Copy link
Copy Markdown

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

@jhurliman

jhurliman commented Nov 3, 2011 via email

Copy link
Copy Markdown
Author

@jhurliman

jhurliman commented Nov 21, 2011 via email

Copy link
Copy Markdown
Author

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