我正在尝试从FB图形API IG用户洞察端点:audience_city:https://developers.facebook.com/docs/instagram-api/reference/ig-user/insights中获取audience_locale、audience_country、audience_gender_age、audience_locale指标。
我提出的要求是:
curl --location --request GET 'https://graph.facebook.com/v10.0/17841411377776842/insights?access_token=...&metric=audience_city&period=lifetime&since=1614639600&until=1614812400'然后返回错误:
{
"error": {
"message": "(#100) (audience_city) metric supports querying data only till yesterday",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "APrDtw-8BzaJSbu4F9Q-RA5"
}
}since和until时间戳被设置为相应的2、4 March 2021 --所以我绝对不会查询“太新鲜”的数据。
对于像online_followers这样的另一个度量标准的相同请求也很有魅力。
有没有人遇到过类似的问题,并能够越过它?
发布于 2022-01-22 14:25:44
也许你现在已经弄明白了,但万一有人降落在这里,让我们帮助他们:
引用文档:https://developers.facebook.com/docs/instagram-api/reference/ig-user/insights#metrics-and-periods
支持生存期的
度量将在24小时的数组中返回结果,期间以UTC−07:00结束。audience_*度量标准不支持范围参数。
因此,基本上,在使用前缀_audience__的度量标准时,不需要指定起始/直到参数。错误信息有点令人困惑。
更新:
这个问题发布后,API文档已经更新,并包含了audience_*规范。我没查过,我的错。
谢谢你的更新,并让我知道!
https://stackoverflow.com/questions/66894783
复制相似问题