Skip to content

Instantly share code, notes, and snippets.

@gabrielhpugliese
Last active December 14, 2015 07:39
Show Gist options
  • Save gabrielhpugliese/5052570 to your computer and use it in GitHub Desktop.
Save gabrielhpugliese/5052570 to your computer and use it in GitHub Desktop.
(function(d, debug){
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 = "//connect.facebook.net/en_US/all" + (debug ? "/debug" : "") + ".js";
ref.parentNode.insertBefore(js, ref);
}(document, /*debug*/ true));
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : '436933159676108', // App ID from the App Dashboard
// channelUrl : '//localhost:3000/channel.html', // Channel File for x-domain communication
channelUrl : 'https://www.friendtrumps.com/channel.html', // Channel File for x-domain communication
status : true, // check the login status upon init?
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true, // parse XFBML tags on this page?
frictionlessRequests : true,
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment