Skip to content

Instantly share code, notes, and snippets.

Created July 3, 2012 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/3044013 to your computer and use it in GitHub Desktop.
Save anonymous/3044013 to your computer and use it in GitHub Desktop.
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src =
('//' + /(\?|&)server=([^$&]+)/.exec(location.href)
? RegExp.$2 + '.facebook.com/assets.php/en_US/'
: 'connect.facebook.net/en_US/') +
// the module to load
'all.js';
ref.parentNode.insertBefore(js, ref);
}(document));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment