【问题标题】:Cannot retrieve ad accounts from Facebook Graph API for user who has authorized with `ads_read` permission无法从 Facebook Graph API 为已获得“ads_read”权限的用户检索广告帐户
【发布时间】:2021-03-04 22:59:06
【问题描述】:

我有一个用户可以使用ads_read 权限在我们的应用上向 Facebook 进行授权,但是当我们尝试使用 Facebook Graph API 上的 /adaccounts 边缘从该用户的帐户中获取广告帐户时,它返回一个错误:

{
  error: {
    message: "Unsupported get request. Object with ID '<USER_ID>' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
    type: 'GraphMethodException',
    code: 100,
    error_subcode: 33,
    fbtrace_id: 'A3UCn8GlZiw9s3MRFG8sDUx'
  }
}

我在 Facebook 社区发现了一个类似的问题,但它来自 Graph API 版本 3。 https://developers.facebook.com/community/threads/489913344898099/

为什么我无法检索该用户的广告帐户?

我正在使用对 Graph API 的常规 GET 请求,使用从 Node.js 服务器获取来检索此数据。

      fetch(
        `https://graph.facebook.com/v10.0/${<USER_ID>}/adaccounts?fields=name,id,account_id&access_token=${<ACCESS_TOKEN>}`,
        {
          method: "GET"
        }
      )
        .then((_res) => _res.json())
        .then((accounts) => {
        // ... do stuff with ad accounts
      })

【问题讨论】:

    标签: node.js facebook facebook-graph-api facebook-javascript-sdk facebook-marketing-api


    【解决方案1】:

    尝试ads_management 权限。

    根据 FB 文档,我猜与 /adaccounts 关联的权限是 ads_management。而ads_read 与 Insight API 等阅读广告报告有关。

    【讨论】:

    • 我会试试这个并马上回复你。我今天早上醒来时也在想同样的事情。
    猜你喜欢
    • 1970-01-01
    • 2018-10-07
    • 2015-11-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-07
    相关资源
    最近更新 更多