Skip to content

Instantly share code, notes, and snippets.

@imduffy15
Created March 12, 2016 13:57
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 imduffy15/616cfd253fd35fe03f99 to your computer and use it in GitHub Desktop.
Save imduffy15/616cfd253fd35fe03f99 to your computer and use it in GitHub Desktop.
<html>
<body>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'lalalalalala',
xfbml : true,
version : 'v2.5'
});
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
console.log('Logged in.');
}
else {
FB.login();
}
});
console.log(FB);
};
(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'));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment