Facebook SINCE and UNTIL graph not working

When I get data from Facebook graph using query string

act_109418612584009/campaigns?fields=id,name,adsets{id,name,insights}&since=2016-03-07&until=2016-03-08 

The result I get is complete data (not a range from then to).

2016-03-17: update

Wrong, I read the document and solved it.

Find it at https://developers.facebook.com/docs/marketing-api/insights/v2.5

Request Structure

 https://graph.facebook.com/<API_VERSION>/<AD_OBJECT_ID>/insights 

Means, I can receive data with request

 https://graph.facebook.com/v2.5/6032185014626/insights?time_range={"since":"2015-03-01","until":"2015-03-31"} 

6032185014626 is an adet identifier

Happy coding

+5
source share
1 answer

Take a look

Temporary breakdown supports the following options:

  • to: Unix or strtotime timestamp value indicating the end of a time-based data range.
  • because: a Unix or strtotime timestamp value indicating the beginning of a range of time-based data.
  • limit: the number of individual objects returned on each page. Limit 0 does not return results. For performance reasons, some ribs have an upper limit on the limit value. We will return the correct page links if this happens.
  • next: The endpoint of the API Graph, which will return the next page of data.
  • previous: The end point of the API Graph, which will return the previous data page.

You need to send unix timestamps instead of dates (YYYY-MM-DD).

+1
source

Source: https://habr.com/ru/post/1244993/


All Articles