2016-08-10 122 views
0

我正在尝试为我的广告帐户使用Facebook图形API,以获取特定日期的见解。我相信日期是使用正确的参数。这是Facebook的用于广告帐户分析https://developers.facebook.com/docs/marketing-api/reference/ad-account/insights/广告帐户的Facebook API。如何使用time_range参数?

文档在这里被我试图使用的网址:

https://graph.facebook.com/v2.6/act_ACCOUNT_ID/insights?access_token=MY_ACCESS_TOKEN&time_range={"since":"2016-08-09","until":"2016-08-09"}&fields=account_id%2Cspend%2Cimpressions%2Ctotal_actions&method=get&pretty=0&sdk=joey 

这是响应我得到:

{"error":{"message":"(#100) Must be a date representation in the format YYYY-MM-DD","type":"OAuthException","code":100,"fbtrace_id":"HEFP4SeNfWa"}} 

回答

0
act_account_id/insights?time_range={'since':'2016-10-17','until':'2016-10-17'}&fields=reach 
+0

能否请你解释一下原始问题的时间范围有什么问题?是使用双引号而不是单引号吗? –

+0

只要您对其进行网址编码,单个或双重应该无关紧要 –

+0

无法为不活动的广告ID获取数据....如何获取不活动的广告洞察详情.. – Von

相关问题