Offline_access and Api-Key confusion

巧了我就是萌 提交于 2019-12-24 09:26:54

问题


I've tried do develop automatic code that would fetch data from ads campaigns under account. My plan is to have server that would query every day to get data from impressions/clicks/costs of ads and save it for later use.

I use https://developers.facebook.com/tools/explorer to get access_token for getting data (insights) from those campaign pages but when I log out to try offline_access it tells access_token is old, cause of password change or access_token getting outdated.

Isn't the whole point of offline_access to grant acccess when user is not logged in?

And besides that.. what's with most of my calls ending having reply as follows: "(#294) Managing advertisements requires the extended permission ads_management, and a participating API key"

I've given access_token that has ads_management, but I have no idea what this Participating Api key even means. Do I need to add this to url call or something? Where do I get this Api Key?

Edit: I want to be able to get data from add campaign pages, so I'm not talking about Apps in page


回答1:


You will want to read up on the deprecation of the offline_access here: https://developers.facebook.com/docs/offline-access-deprecation/

But most importantly follow the guide here on how to handle invalid access tokens:

https://developers.facebook.com/blog/post/500/

You app is to monitor the error messages coming back from the API and handle it gracefully.




回答2:


I have the same issue and I found this bug can be reason of our problem. It's already accepted and assigned, but still not solved. I hope it's really bug and not a secure hole, that was closed :)



来源:https://stackoverflow.com/questions/9273679/offline-access-and-api-key-confusion

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