1

I'm compiling a URL like

  https://graph.facebook.com/v2.5/<campaign id>/insights?since=2015-08-10&until=2015-11-13&time_increment=1&access_token=<valid token>

This query, even in GRAPH explorer, gives back data which is obviously outside the given date range. Putting something weired as "until" date causes an error, but I do not get it working in a way, that the result is within the given range. I.e. I get rows for "2015-04-21".

What am I missing?

Axel Amthor
  • 10,980
  • 1
  • 25
  • 44

3 Answers3

0

Try adding the time_range parameter to the request, for example:

&time_range[since]=2016-02-15&time_range[until]=2016-02-16
Al Ducent
  • 288
  • 2
  • 6
0

Use insights as an object instead of a field~

https://graph.facebook.com/v2.5/<campaign id>/insights/since=2015-08-10&until=2015-11-13&access_token=<valid token>
Eric Renouf
  • 13,950
  • 3
  • 45
  • 67
Rui Nunes
  • 1
  • 1
0
ad_account_id/ads?fields=insights.time_range({"since":"2017-11-01","until":"2017-11-23"}){ad_id,reach,ad_name,impressions,clicks}&breakdowns=publisher_platform

use insights.time_range({"since":"2017-11-01","until":"2017-11-23"}). it's working for me.

Smittey
  • 2,475
  • 10
  • 28
  • 35
Ashish
  • 56
  • 3