function statusChangeCallback(res){ console.log(res) }
function checkLoginState() { FB.getLoginStatus(function(response) { statusChangeCallback(response);
}); }
window.fbAsyncInit = function() {
FB.init({
appId : '396687467423364',
cookie : true,
xfbml : true,
version : 'v1.0'
});
FB.AppEvents.logPageView();
FB.getLoginStatus( function(response) {
statusChangeCallback(response);
});
};
(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 = "https://connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));
</script> <script>// Only works after FB.init
is called
function myFacebookLogin() {
FB.login(function(){}, {scope: 'email'});
}
</script>
Login with Facebook