我目前正在使用这样的方法:
FB.ui({ method: 'oauth', perms: "user_photos" }, post_auth_callback);
OAuth 2.0升级是否更改了请求权限的方式? current Facebook documentation未显示 perms 参数。看起来它已被范围参数替换。但是,在测试中,范围参数被忽略,它只是请求标准访问。
答案 0 :(得分:0)
尝试使用FB.login()方法并传递范围参数,如上所述。另外,请确保在调用FB.init()时将 oauth 参数设置为true,以便启用OAuth 2.0。
FB.login(function(response) {
if(response.authResponse) {
console.log("photo permissions granted")'
} else {
console.log("photo permissions denied")'
}
}, {
scope : 'user_photos,friends_photos'
});