Facebook Oauth 2.0访问令牌是否过期? [英] Do Facebook Oauth 2.0 Access Tokens Expire?

查看:168
本文介绍了Facebook Oauth 2.0访问令牌是否过期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Facebook上使用Oauth 2.0授权,并且想知道Facebook的访问权限是否过期。如果是这样,有没有办法申请长寿命访问令牌?

解决方案

在挖了一下之后,我发现这个。这似乎是答案:



offline_access:
使您的应用程序可以随时代表用户执行授权的请求。默认情况下,大多数访问令牌在短时间内过期,以确保应用程序只有在主动使用应用程序时才代表用户进行请求。此权限使我们的OAuth端点返回的访问令牌长期存在。



它的请求权限值。



http://developers.facebook.com/docs/authentication/permissions



更新



offline_access权限已被删除。 b
$ b

https:/ /developers.facebook.com/docs/roadmap/completed-changes/offline-access-removal/


I am playing around with the Oauth 2.0 authorization in Facebook and was wondering if the access tokens Facebook passes out ever expire. If so, is there a way to request a long-life access token?

解决方案

After digging around a bit, i found this. It seems to be the answer:

offline_access: Enables your application to perform authorized requests on behalf of the user at any time. By default, most access tokens expire after a short time period to ensure applications only make requests on behalf of the user when the are actively using the application. This permission makes the access token returned by our OAuth endpoint long-lived.

Its a permission value requested.

http://developers.facebook.com/docs/authentication/permissions

UPDATE

offline_access permission has been removed a while ago.

https://developers.facebook.com/docs/roadmap/completed-changes/offline-access-removal/

这篇关于Facebook Oauth 2.0访问令牌是否过期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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