Skip to content

Instantly share code, notes, and snippets.

@vseventer
Created August 30, 2012 19:04
Show Gist options
  • Select an option

  • Save vseventer/3537784 to your computer and use it in GitHub Desktop.

Select an option

Save vseventer/3537784 to your computer and use it in GitHub Desktop.
Facebook authentication.
// 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