Facebook Marketing API Ads Insights

ぐ巨炮叔叔 提交于 2019-12-11 05:05:35

问题


I'm currently trying to access, through my marketing app, all the insights of my ads/campaings/ads account (clicks,impressions,etc). The tokens I generate has permissions for ads_management,ads_read,read_insights and manage_pages.

Nevertheless, I always get this answer:

{"data":[],"paging":{"cursors":{"before":"MAZDZD","after":"LTEZD"}}}

(I get that response after I post something like

curl -G \
-d "fields=impressions" \
-d "access_token=my_access_token" \
"https://graph.facebook.com/v2.8/act_MyAccountNumber/insights"

And then make a get using the report id, when the report id is completed)

I added my account as admin of the app and also added it in the Authorized Ad Account IDs list.

My app has development level access.

What am I doing wrong?


回答1:


Are you sure you had impressions recently?
Because I observe similar thing when try to access it with default date_preset that is 30 days:

> get "act_*****/insights", "impressions"
=> []
> get "act_*****/insights?date_preset=lifetime", "impressions"
=> ["11"]


来源:https://stackoverflow.com/questions/42768948/facebook-marketing-api-ads-insights

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!