我已经添加了facebook登录到我的离子4应用程序。它在某些设备上运行良好,但大多数设备无法工作。
当用户单击按钮,然后再次返回到同一个页面时,会发生什么情况呢?没有打开Facebook授权或任何其他回应。
这是我的代码:
facebookLogin(): Promise<any> {
return this.facebook.login(['email'])
.then( response => {
const facebookCredential = firebase.auth.FacebookAuthProvider
.credential(response.authResponse.accessToken);
firebase.auth().signInWithCredential(facebookCredential)
.then( success => {
console.log("Firebase success: " + JSON.stringify(success));
this.isLogged = true;
// tslint:disable-next-line: no-unused-expression
this.router.navigate(['']);
console.log('logged in');
});
}).catch((error) => { console.log(error) });
}更新
我注意到,一些东西在打开facebook时闪烁得很快,它授权对话,但不需要等待用户是否接受就立即关闭它。
发布于 2019-07-15 15:05:59
发现造成问题的原因不是把我的facebook应用程序设置为生活,而是在开发模式中!
https://stackoverflow.com/questions/57042224
复制相似问题