为什么Facebook登录不要求正确的权限? [英] Why is the Facebook login not asking for correct permissions?
问题描述
我使用Facebook登录使用 FB.login
(我不想使用Facebook登录按钮)。我的问题是,登录后,Facebook对话框不会显示列出的权限,如下所示。
I use Facebook login using FB.login
(and I don't want to use the Facebook login button). My problem is that after login, the Facebook dialog don't show the listed permission, as follows.
FB.login(function (response) {
if (response.status == "connected") {
//alert(" connected ");
}
else {
//alert(" not connected ");
}
}, { scope: 'email' });
Facebook对话框仅显示访问我的基本信息。如何解决这个问题?
The Facebook dialog show "Access my basic information" only. How do I fix this problem?
注意:如果我尝试Facebook登录,它会正确显示权限。
Note: if I try the Facebook login, it shows the permission correctly.
注2:用户点击允许后的回复是:
Note 2: the response after the user clicks Allow is:
用户已取消登录或尚未完全授权。
User cancelled login or did not fully authorize.
推荐答案
因为官方文件中的错误。
权限的属性名称不是范围,而是perms:
That's because of a mistake in the official documentation. The property name for the permissions is not "scope", but "perms":
FB.login(function (response) {
if (response.status == "connected") {
//alert(" connected ");
}
else {
//alert(" not connected ");
}
}, { perms: 'email' });
这篇关于为什么Facebook登录不要求正确的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!