没有从 Ads Insights API (/insights) 返回的洞察数据

I. *_*rin 1 facebook facebook-rest-api facebook-marketing-api

Graph API Explorer在获取请求后返回

act_396592**/insights?fields=actions
Run Code Online (Sandbox Code Playgroud)

作为

{
"data": [
        ]
}
Run Code Online (Sandbox Code Playgroud)

我也尝试过使用广告 ID 和时间范围

/6072038816***/insights?fields=impressions&since=2017-08-01&until=2017-08-10
Run Code Online (Sandbox Code Playgroud)

图片

注意:此帐户有足够的广告。我已获得 ads_read 许可。

I. *_*rin 7

act_396592**/insights
Run Code Online (Sandbox Code Playgroud)

上述请求不起作用,因为 Facebook 默认显示最近 30 天的见解文档。如果广告在过去 30 天内未处于活动状态,则返回空数据。

/6072038816***/insights?fields=impressions&since=2017-08-01&until=2017-08-10
Run Code Online (Sandbox Code Playgroud)

以上请求无效,因为参数错误。我不知道为什么它没有抛出任何错误。它确实令人困惑。正确的方法之一是,使用time_range

/6072038816***/insights?fields=impressions&time_range={'since':'2017-08-01','until':'2017-08-10'}
Run Code Online (Sandbox Code Playgroud)

或使用date_preset

/insights?fields=reach&date_preset=lifetime
Run Code Online (Sandbox Code Playgroud)