https://developers.facebook.com/docs/reference/ads-api/adreportstats/
基于文档
time_ranges 时间戳对象数组 {time_start, time_stop} 或日期对象 {day, month, year}。
所以在 Graph API Explorer 中,我将 time_ranges 值设置为
time_ranges=[{"day_start":{"day":1,"month":11,"year":2013}},{"day_stop":{"day":10,"month":11,"year":2013}}]
这给我一个错误
{
"error": {
"message": "(#100) Please set time_start and time_stop or day_start and day_stop.",
"type": "OAuthException",
"code": 100
}
}
为简洁起见,我删除了上述 URL 的其他部分。我已经尝试使用 date_preset 值并且报告返回数据。
谢谢。
编辑:完整的 URL(没有有效的帐户 ID)
https://graph.facebook.com/act_12345/reportstats?data_columns=["account_id","account_name","campaign_id","campaign_name","impressions","clicks","spend"]&time_ranges=["{ 'day_start':{'day':1,'month':11,'year':2013}}","{'day_stop':{'day':10,'month':11,'year':2013 }}"]