Skip to content

Instantly share code, notes, and snippets.

@mazikwyry
Created September 20, 2016 06:08
Show Gist options
  • Save mazikwyry/1b5043384639999bc2ed8c4369ae4508 to your computer and use it in GitHub Desktop.
Save mazikwyry/1b5043384639999bc2ed8c4369ae4508 to your computer and use it in GitHub Desktop.
var SocialLogins = {
facebook: function(callback){
hello.login('facebook', {scope: 'email, user_friends, publish_actions'}, function(data){
$.cookie('facebook_oauth_token', data.authResponse.access_token, { expires: 7, path: '/' });
callback();
});
},
twitter: function(callback){
hello.login('twitter', {}, function(data){
$.cookie('twitter_oauth_token', data.authResponse.access_token, { expires: 7, path: '/' });
callback();
});
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment