Skip to content

Instantly share code, notes, and snippets.

@oscherler
Created July 28, 2012 12:12
Show Gist options
  • Save oscherler/3193052 to your computer and use it in GitHub Desktop.
Save oscherler/3193052 to your computer and use it in GitHub Desktop.
Hacks to correct annoying Facebook bugs
// facebook init
window.fbAsyncInit = function() {
FB.init( {
appId : app_id, // App ID
channelURL : channel_url, // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
oauth : true, // enable OAuth 2.0
xfbml : true // parse XFBML
} );
// Hack to correct annoying Facebook bug (not needed anymore, only the next one is
// http://bugs.developers.facebook.net/show_bug.cgi?id=19042#c19
// http://stackoverflow.com/a/7511011/157259
//FB.UIServer.setActiveNode = function(a,b){FB.UIServer._active[a.id]=b;} // IE hack to correct FB bug
// Hack to correct annoying Facebook bug
// http://bugs.developers.facebook.net/show_bug.cgi?id=20168#c5
// http://stackoverflow.com/a/7533922
FB.UIServer.setLoadedNode = function(a,b){FB.UIServer._loadedNodes[a.id]=b;};
// Additional initialization code here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment