【发布时间】:2021-03-04 22:59:06
【问题描述】:
我有一个用户可以使用ads_read 权限在我们的应用上向 Facebook 进行授权,但是当我们尝试使用 Facebook Graph API 上的
{
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