Facebook 完全权限 AccessToken 替代离线访问令牌 [英] Facebook full permission AccessToken alternative to Offline access token

查看:35
本文介绍了Facebook 完全权限 AccessToken 替代离线访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在使用桌面 Windows 服务下载我的 Facebook 页面见解/页面喜欢/朋友等图表数据.因此,为此我在我的 facebook 页面上添加了应用程序并生成了完全许可的离线访问令牌.因此,使用它,我可以正确下载过去一年中我的 Facebook 页面见解.
但是,由于 Facebook 弃用了离线访问令牌.请任何人都可以帮助我如何生成具有完全权限的访问令牌,无需登录即可下载我的页面洞察数据(没有任何用户/用户界面对话框(允许等)).

Currently I am using desktop windows service to download my Facebook page insights/ page likes/friends etc. graph data . so, for that i have added app on my facebook page and generated full permission offline access token. so, using that i am downloading my facebook page insights properly from last one year.
But, as Facebook deprecated offline acccess token. Please anyone can help me how i can generate Access Token with full permission to download my page insight data without signing in (witout any User/Ui dialog (allow etc.)).

现在,我正在尝试 &通过一些 api 生成该访问令牌,如下所示:-https://graph.facebook.com/oauth/access_token?client_id=xxxx&client_secret=xxxxx&grant_type=client_credentials

Right now , i am trying & going through some api to generate that access token as following : - https://graph.facebook.com/oauth/access_token?client_id=xxxx&client_secret=xxxxx&grant_type=client_credentials

但是,使用上面的调用,我得到了访问令牌(短长度令牌)-例如:-

But , using above call i am getting access token (short length token) - e.g : -

123484913842345|jkioEjsRAhFrNdertg9zuxPiopl

尝试查看图形数据时,使用上述访问令牌出现以下错误:-

Using above access token getting following error when try to see graph data : -

{"error": {"message": "Unsupported get request.","type": "GraphMethodException","code": 100  }}

但是,我发现这个访问令牌没有完全权限&寿命也很短.

But, i have found that this access token does not have full permissions & also short life.

当我使用旧的离线访问令牌时,它会正确给出响应.(此令牌将在一段时间后关闭).因此,要生成大约 60 天寿命的相同类型的访问令牌.请帮我解决这个问题.我如何生成具有完整权限且长度为 110 个字符的访问令牌.此外,我正在使用 Windows 服务,因此任何人都可以帮助解决如何在不登录的情况下生成访问令牌(用户/UI 活动)

When I have used my old offline access token then it is giving response properly. (this token will be off after some duration). so, to generate same type of Access token with around 60 day life. Please help me on this. How i can generate access token with full permission with full 110 character length. Also, i am using windows service so , anyone can help on this how to generete access token without signing in (User/UI activity)

推荐答案

要解决此问题,您需要 延长短期令牌.

To fix this you need to extend the short lived token.

您还可以调试访问令牌而无需任何用户交互以查看扩展访问令牌的操作是否有效.

You can also debug the access token without any user interaction to see if the action of extending the access token worked.

这个链接是一个很好的参考离线访问到期.

This link is a good reference about the expiration of offline access.

当您使用此 url 调试访问令牌时:

When you debug the access token using this url:

https://graph.facebook.com/debug_token?input_token=INPUT_TOKEN&access_token=ACCESS_TOKEN

INPUT_TOKEN 是用户访问令牌

ACCESS_TOKEN 是应用访问令牌,其形式如下:APP_ID|APP_SECRET为了澄清这一点,如果我的应用程序 ID 是 123 &应用密码是 abc 然后应用访问令牌是 123|abc

ACCESS_TOKEN is the app access token which is formed like so: APP_ID|APP_SECRET To clarify on that, If my app id is 123 & the app secret is abc then the app access token is 123|abc

这篇关于Facebook 完全权限 AccessToken 替代离线访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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