Offline_access和Api-Key混淆 [英] Offline_access and Api-Key confusion

查看:117
本文介绍了Offline_access和Api-Key混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试开发自动代码,该代码将从帐户下的广告系列中获取数据.我的计划是让服务器每天查询一次,以从广告的展示次数/点击次数/费用中获取数据,并将其保存以备后用.

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.

我使用 https://developers.facebook.com/tools/explorer 来获取access_token用于从这些广告系列页面获取数据(见解),但是当我注销尝试offline_access时,它会告诉access_token很旧,导致密码更改或access_token过时.

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.

不是用户未登录时,offline_access整个访问点都不能授予访问权限吗?

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

此外,..我的大部分电话都结束了如下回复: (#294)管理广告需要扩展权限ads_management和参与的API密钥"

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"

我给了具有ads_management的access_token,但我不知道这个Participing Api密钥的含义.我是否需要将此添加到url调用或其他内容?我从哪里获得此Api密钥?

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?

我希望能够从添加广告系列页面中获取数据,所以我不是在谈论页面中的应用

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

推荐答案

您将要在此处阅读关于offline_access弃用的信息:

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/

您的应用程序将监视从API返回的错误消息并妥善处理.

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

这篇关于Offline_access和Api-Key混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆