相对日期之间的Facebook Marketing API

时间:2016-06-01 02:14:06

标签: facebook facebook-graph-api

我知道我可以在两个指定日期之间从API检索数据,如下所示:

https://graph.facebook.com/v2.5/act_xxxxxx/insights?level=ad&fields=ad_name,adset_name,campaign_name,spend,unique_clicks,clicks,impressions,cost_per_unique_click,cpm,ctr&sort=spend_descending&time_range[since]=2016-04-01&time_range[until]=2016-04-16

有没有办法使用今天的相对日期从API检索数据?比如这个伪代码:

https://graph.facebook.com/v2.5/act_xxxxxx/insights?level=ad&fields=ad_name,adset_name,campaign_name,spend,unique_clicks,clicks,impressions,cost_per_unique_click,cpm,ctr&sort=spend_descending&time_range[since]=15 DAYS AGO&time_range[until]=7 DAYS AGO