Firebase 无法向发布授权请求传递读取权限(电子邮件)
我正在尝试使用Firebase身份验证使用Facebook登录。我遵循了整个文档。最后,每当我单击“登录”按钮时,就会出现一个错误,提示:Firebase 无法向发布授权请求传递读取权限(电子邮件),firebase,firebase-authentication,facebook-login,Firebase,Firebase Authentication,Facebook Login,我正在尝试使用Firebase身份验证使用Facebook登录。我遵循了整个文档。最后,每当我单击“登录”按钮时,就会出现一个错误,提示: Cannot pass a read permission (email) to a request for publish authorization 显示错误的行是: LoginManager.getInstance().logInWithPublishPermissions(LoginActivity.this,Arrays.asList("emai
Cannot pass a read permission (email) to a request for publish authorization
显示错误的行是:
LoginManager.getInstance().logInWithPublishPermissions(LoginActivity.this,Arrays.asList("email", "public_profile"));
有人能解释一下我做错了什么吗?我也找到了其他答案,但没有任何帮助。使用
logInWithReadPermissions
而不是logInWithPublishPermissions
。错误消息非常清楚,您正试图使用用于发布权限的函数请求读取权限。.getInstance()。logInWithPublishPermissions
不是Firebase身份验证。可通过Firebase JavaScript(web)SDK通过联合提供商(如Facebook)登录。有关详细信息,请参阅
啊!!。。那是一个愚蠢的错误。我的错。谢谢:)不客气。请不要忘记接受我的回答:)
firebase.auth().signInWithPopup(provider).then(function(result) {
// This gives you a Facebook Access Token. You can use it to access the Facebook API.
var token = result.credential.accessToken;
// The signed-in user info.
var user = result.user;
// ...
}).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// The email of the user's account used.
var email = error.email;
// The firebase.auth.AuthCredential type that was used.
var credential = error.credential;
// ...
});