简体   繁体   English

广告端点上的时间范围过滤器(Facebook API)

[英]time range filter on ads endpoint (Facebook API)

We are trying to filter results of ads using date parameters on the /v2.7/{ad-account-id}/ads endpoint我们正在尝试使用 /v2.7/{ad-account-id}/ads 端点上的日期参数过滤广告结果

According to the docs, you can use a time_range parameter, but it doesn't seem to be working properly using the PHP SDK or the graph explorer, example:根据文档,您可以使用time_range参数,但使用 PHP SDK 或图形浏览器似乎无法正常工作,例如:

act_{1234456}/ads?time_range={'since':'2016-08-01','until':'2016-08-12'} act_{1234456}/ads?time_range={'since':'2016-08-01','until':'2016-08-12'}

The documentation is pretty unclear on this because there is 2 references to the same ads endpoint but each with different params文档对此非常不清楚,因为有 2 个对同一广告端点的引用,但每个引用都有不同的参数

https://developers.facebook.com/docs/marketing-api/reference/adgroup https://developers.facebook.com/docs/marketing-api/reference/adgroup

https://developers.facebook.com/docs/marketing-api/reference/ad-account/ads/ https://developers.facebook.com/docs/marketing-api/reference/ad-account/ads/

Has anyone found a way to successfully filter by date/time range on the ads endpoint?有没有人找到一种在广告端点上按日期/时间范围成功过滤的方法?

The right way to use the time_range param is as follows:使用time_range参数的正确方法如下:

&time_range[since]=YYYY-MM-DD&time_range[until]=YYYY-MM-DD

make sure that square brackets are not url-encoded.确保方括号不是 url 编码的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM