When I get data from Facebook graph explore with query string
act_109418612584009/campaigns?fields=id,name,adsets{id,name,insights}&since=2016-03-07&until=2016-03-08
Result I get is full data (not range in since and until).
2016-03-17: Update
Wrong way, i had read document and solve it.
Find this at https://developers.facebook.com/docs/marketing-api/insights/v2.5
Struct of query is
https://graph.facebook.com/<API_VERSION>/<AD_OBJECT_ID>/insights
So meaning i can get data with query
https://graph.facebook.com/v2.5/6032185014626/insights?time_range={"since":"2015-03-01","until":"2015-03-31"}
6032185014626 is Id of adset
Happy coding
Have a look at
A time-paginated edge supports the following parameters:
- until : A Unix timestamp or strtotime data value that points to the end of the range of time-based data.
- since : A Unix timestamp or strtotime data value that points to the start of the range of time-based data.
- limit : This is the number of individual objects that are returned in each page. A limit of 0 will return no results. Some edges have an upper maximum on the limit value, for performance reasons. We will return the correct pagination links if that happens.
- next : The Graph API endpoint that will return the next page of data.
- previous : The Graph API endpoint that will return the previous page of data.
You need to send unix timestamps instead of dates (YYYY-MM-DD).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With