Я ввел логин Facebook в моем приложении ionic 3.В то время как приложение facebook установлено на моем устройстве Android, я не могу войти через Facebook. Я получаю нежелательную ошибку.
facebook_login(){
this.fb.getLoginStatus().then((res) => {
console.log(res);
if (res.status === 'connected') {
console.log("connected1: " + res.authResponse.userID);
var fb_id = res.authResponse.userID;
var fb_token = res.authResponse.accessToken;
this.fb.api("/me?fields=name,gender,email", []).then((user) => {
user.picture = "https://graph.facebook.com/" + fb_id + "/picture?type=large";
var picture = user.picture;
var name = user.name;
var email = user.email;
this.facebook_server_login(name,email,fb_id,picture);
});
} else {
this.fb.login(['public_profile','user_birthday','user_gender', 'email'])
.then( (res: FacebookLoginResponse) => {
if(res.status == "connected") {
var fb_id = res.authResponse.userID;
var fb_token = res.authResponse.accessToken;
this.fb.api("/me?fields=name,gender,email", []).then((user) => {
user.picture = "https://graph.facebook.com/" + fb_id + "/picture?type=large";
var picture = user.picture;
var name = user.name;
var email = user.email;
this.facebook_server_login(name,email,fb_id,picture);
});
}
else {
this.sysprvd.showNetworkError();
}
})
.catch((e) => {
console.log(e);
this.sysprvd.showNetworkError();
});
}
});
}