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

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

问题描述

目前我正在使用桌面Windows服务下载我的Facebook页面洞察/页面喜欢/朋友等图形数据。所以,因为我已经在我的Facebook页面上添加了应用程序,并生成了完全权限的脱机访问令牌。所以,使用我从最后一年正确地下载我的Facebook页面的见解。

但是,随着Facebook不赞成离线acccess令牌。
请任何人都可以帮助我如何通过完全权限生成访问令牌来下载我的页面洞察数据,而无需登录(没有任何用户/ Ui对话框(允许等等))。



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



但是,使用上面的电话我正在获取访问令牌(短长度令牌) - 例如: -

  123484913842345 | jkioEjsRAhFrNdertg9zuxPiopl 

尝试查看图表数据时,使用上述访问令牌获取以下错误: -

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

但是,我发现这个访问令牌没有完全权限还有短暂的生活。



当我使用旧的离线访问令牌时,它正在正确响应。 (这个令牌将在一段时间后关闭)。所以,要生成相同类型的Access令牌,大约有60天的生命。
请帮助我。我如何可以完整的权限生成具有完整的110个字符长度的访问令牌。
另外,我正在使用Windows服务,所以任何人都可以帮助这个如何进行访问令牌而不登录(用户/ UI活动)

解决方案

要解决此问题,您需要扩展短暂的令牌。



您还可以 debug 访问令牌,无需任何用户交互,以查看扩展访问令牌的操作是否有效。



a href =https://developers.facebook.com/docs/roadmap/completed-changes/offline-access-removal/ =nofollow>链接是关于离线访问到期的好参考



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



https: / b

INPUT_TOKEN 是用户访问令牌



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


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.)).

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.

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.

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 is the user access token

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天全站免登陆