Facebook Ad insight GRAPH API edge for a date rang

2019-07-11 03:50发布

I am trying to get Facebook Ad stats for a given date range using Facebook Graph API. It doesn't seem to work.

https://graph.facebook.com/v2.5/6039003162091/insights?since=2016-03-14&until=2016-03-15&access_token=<>

Any idea how I should go about with this?

2条回答
叛逆
2楼-- · 2019-07-11 04:05

The answer is in the comments above and adding it here so it is clear. The issue was in the format of the time_range parameter as it needs to be

time_range={"since":"2016‌​-03-15","until":"2016-03-15"} 
查看更多
虎瘦雄心在
3楼-- · 2019-07-11 04:19

https://graph.facebook.com/v2.5/act_id?fields=ads{insights.time_range({"since":"2016-03-14","until":"2016-04-15"})}&access_token=YOUR_ACCESS_TOKEN

if you want day by day data you can alter as

https://graph.facebook.com/v2.5/6039003162091?fields=ads{insights.time_range({"since":"2016-03-14","until":"2016-04-15"}).time_increment(1)}&access_token=YOUR_ACCESS_TOKEN

查看更多
登录 后发表回答