Skip to content

Instantly share code, notes, and snippets.

Created February 20, 2015 10:54
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 anonymous/59b04de0349847d2084c to your computer and use it in GitHub Desktop.
Save anonymous/59b04de0349847d2084c to your computer and use it in GitHub Desktop.
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_APP_ID',
cookie : true, // enable cookies to allow the server to access
// the session
xfbml : true, // parse social plugins on this page
version : 'v2.1' // use version 2.1
});
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment