gpt4 book ai didi

javascript - Fb.Login() 没有获得扩展权限

转载 作者:行者123 更新时间:2023-11-28 00:16:28 25 4
gpt4 key购买 nike

我想通过我的应用程序在用户 Facebook 时间轴上发布内容。我按照 facebook 教程添加了 js sdk 并尝试了一个简单的示例。

    window.fbAsyncInit = function () {
FB.init({
appId: 'xxx',
xfbml: true,
version: 'v2.3'
});
};

(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) { return; }
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

这就是我想要获取 accessToken 的方式:

$(document).on('click', '#temporary-id', function () {
FB.login(function (response) {
var perms = response.authResponse.grantedScopes;
var uid = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
console.log(uid);
console.log(perms);
console.log(accessToken);
}, {
scope: "publish_actions,publish_stream",
return_scopes: true
});

但不会返回我发布的权限,只有这三个:电子邮件、contact_email、public_profile。怎么了?我该如何纠正这个问题?

最佳答案

publish_stream 多年来已被弃用。您为什么要请求不再存在的权限?

无论如何,我假设您正在尝试作为应用程序中没有 Angular 色的用户。请阅读有关登录审核的文档:https://developers.facebook.com/docs/facebook-login/review/what-is-login-review

未经审核,大多数权限仅适用于应用管理员/开发人员/测试人员。

关于javascript - Fb.Login() 没有获得扩展权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30425553/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com