gpt4 book ai didi

facebook - 无法通过图形 API 创建 Facebook 相册

转载 作者:行者123 更新时间:2023-11-30 05:30:08 33 4
gpt4 key购买 nike

我无法通过图形 API 创建 Facebook 相册。现在,它总是抛出一个错误

(#10) Application does not have permission for this action

我不知道为什么。我确定我有正确的访问 token (它是有效的,不会过期)。我在 php 和 javascript 中有同样的错误。

我在 js 中的示例代码:

FB.api('/me/albums', 'post', {
access_token: access_token, // it is a valid
name: 'test album 1',
message: 'test album 1'
}, function(res) {

console.log(res); // throw a error "(#10) Application does not have permission for this action"
});

Facebook 是否有错误或我遗漏了什么?

编辑: 我从 https://developers.facebook.com/bugs/680991411993635/ 中找到了正确答案:

Even though you are using a Page Access Token, you need the user_photos permission in order to create a Photo Album as the Page.

最佳答案

  1. Facebook 确实一些错误……我们不是吗?
  2. 您确实错过了一些东西 - 您需要正确的权限。

要创建相册,您需要请求 publish_actions permission来自您的用户。此权限允许您的应用程序向用户提要发布故事,包括新专辑。

关于facebook - 无法通过图形 API 创建 Facebook 相册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24781990/

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