Created
November 15, 2011 17:54
-
-
Save huljas/1367782 to your computer and use it in GitHub Desktop.
Facebook cookie authentication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="fb-root"></div> | |
<script> | |
window.fbAsyncInit = function() { | |
FB.init({appId : 'APP_ID', status : true, cookie : true, oauth : true, xfbml : true}); | |
}; | |
// 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> | |
<div class="fb-login-button">Login with Facebook</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for your work! After about 2 hours of searching in Google found your job and this just works! Helped a lot!