gpt4 book ai didi

Facebook 图页/帖子见解 - 权限错误

转载 作者:行者123 更新时间:2023-12-05 06:27:31 28 4
gpt4 key购买 nike

我有 2 个我是管理员的 Facebook 页面,我们称它们为 page_apage_b

如果我为 page_a 运行它,它会按预期工作:

HTTP GET -> {PAGE_A_ID}/insights?metric=page_fans_country


{
"data": [
{
"name": "page_fans_country",
"period": "day",
"values": [
{
"value": {
"AR": 4,
"AT": 13,
"AU": 7,
"BE": 16,
....

我使用的页面访问 token 具有以下范围:read_insightsmanage_pagespages_show_listpublic_profile

但是当我尝试查询帖子的详细信息时,我得到了这个

HTTP GET -> {PAGE_A_ID}_{PAGE_A_POSTID}/insights?metric=post_impressions,post_impressions_unique,post_video_views,post_video_views_unique&period=lifetime

{
"error": {
"message": "Permissions error",
"type": "OAuthException",
"code": 200,
"error_subcode": 1504029,
"is_transient": false,
"error_user_title": "User doesn't have enough permissions to load insights",
"error_user_msg": "You do not have enough permission to view the metric.",
"fbtrace_id": "..."
}
}

当我对 page_b 做同样的事情时它会起作用

HTTP GET -> {PAGE_B_ID}_{PAGE_B_POSTID}/insights?metric=post_impressions,post_impressions_unique,post_video_views,post_video_views_unique&period=lifetime

{
"data": [
{
"name": "post_video_views",
"period": "lifetime",
"values": [
{
"value": 0
}
],
....

page_b 的页面访问 token 与 page_a 具有相同的范围

我可以在 Facebook UI 中看到所有数字,但我无法通过 API 访问它,以前有人遇到过类似问题吗?我卡住了,不知道从这里去哪里。

以上所有代码都已在 Facebook Graph Explore 中运行,并带有新生成的标记。

任何关于从这里到哪里去的意见都将受到赞赏。

最佳答案

正如@xuantuan58 在评论中提到的,这似乎是 FB API 中的一个错误。 https://developers.facebook.com/support/bugs/301627877187448/

也可能与此错误报告有关:https://developers.facebook.com/support/bugs/2380273985356980/

我注意到它只发生在某些用户和页面上,但到目前为止我还看不到模式。有时 API 不会返回错误,而只会返回一个空数据数组。如果您认为响应中应该有数据,请尝试使用图形浏览器工具,因为我发现它有时会提供更好的错误响应。

https://developers.facebook.com/tools/explorer/

更新:此问题现已被 Facebook 标记为已解决。我测试了一下,发现这个问题确实已经修复了。

关于Facebook 图页/帖子见解 - 权限错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55220551/

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