Created
August 30, 2012 19:04
-
-
Save vseventer/3537784 to your computer and use it in GitHub Desktop.
Facebook authentication.
This file contains hidden or 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
| // Initialize the Facebook SDK. | |
| FB.init({ | |
| appId: '<your-app-id>', | |
| oauth: true | |
| /* additional properties */ | |
| }); | |
| // Open login popup. | |
| FB.login(function(response) { | |
| if(response.authResponse) { | |
| // Perform some logic to save the user and access token. | |
| } | |
| else { | |
| // User cancelled login or did not fully authorize. | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment