[英]Expo Facebook login keeps going to blank cancel screen
I am trying to perform facebook login with Expo and react native using Expos Facebook Library but when I try to log in and choose "Log In with Facebook App" it just goes to a blank screen with a navbar button saying cancel... If I say log in with email/phone number however, it works. 我正在尝试使用Expo进行Facebook登录并使用Expos Facebook Library响应本机,但是当我尝试登录并选择“使用Facebook App登录”时,它会转到空白屏幕,并带有导航栏按钮,显示“取消...”。说用电子邮件/电话号码登录,但是可以。
Here is my code... 这是我的代码...
_loginWithFacebook = async() => {
const {
type,
token
} = await Facebook.logInWithReadPermissionsAsync(
"429006161020305",
{
permissions: ["public_profile", "email"]
}
);
if (type == "success") {
alert("Heya!")
} else if (type == "cancel") {
alert("Canceled login")
}
}
If you face this error on standalone app, just double check the facebook app id in app.json is right and match with appId which used in Facebook.logInWithReadPermissionsAsync(appId, options)
如果您在独立应用程序上遇到此错误,只需仔细检查app.json中的facebook应用程序ID是否正确,并与
Facebook.logInWithReadPermissionsAsync(appId, options)
中使用的appId匹配
app.json must include: app.json必须包含:
...
"facebookAppId": "xxx",
"facebookDisplayName": "displayName",
"facebookScheme": "fbxxx",
...
@Envy, where can I find facebookAppId, facebookDisplayName, displayName ,facebookScheme ? @Envy,在哪里可以找到facebookAppId,facebookDisplayName,displayName,facebookScheme? thanks
谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.