Skip to content

Instantly share code, notes, and snippets.

@rakeshpai
Created January 11, 2012 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rakeshpai/1594914 to your computer and use it in GitHub Desktop.
Save rakeshpai/1594914 to your computer and use it in GitHub Desktop.
Facebook's JS SDK's loader script
<script>
// <snip>
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment