I am new to ember and javascript I have to get the access token and the userid.I am not able to code the flow in which it should work.
Controller
actions:{
fblogin:function () {
FB.login(function(response) {
if (response.status === 'connected') {
// Logged into your app and Facebook.
} else if (response.status === 'not_authorized') {
// The person is logged into Facebook, but not your app.
} else {
// The person is not logged into Facebook, so we're not sure if
// they are logged into this app or not.
}
},{scope:'email'});
// body...
}
}
initializers
name: 'fb',
initialize:function() {
return FB.init({
appId: '128746678',
version: 'v2.5',
xfbml: true
})
},
when action fblogin is called it opens the fb for login and app permision but how do I get accesstoken. Please give the correct flow in which I should write the code for fb integration in ember app.
Aucun commentaire:
Enregistrer un commentaire