Facebook 60 天访问令牌和已弃用的 Offline_Access [英] Facebook 60 day access token and Deprecated Offline_Access

查看:24
本文介绍了Facebook 60 天访问令牌和已弃用的 Offline_Access的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Facebook 的弃用离线访问"文档(http://developers.facebook.com/docs/offline-access-deprecation/) 声明如下:

Facebook's "Deprecated Offline Access" doc (http://developers.facebook.com/docs/offline-access-deprecation/) states the following:

*服务器端 OAuth 开发人员

*Server-side OAuth Developers

如果 access_token 是从服务器端 OAuth 调用生成的,则生成的 access_token 将具有更长的到期时间.如果在该用户仍然存在有效的 access_token 时进行调用,则第二次调用返回的 access_token 可能相同或可能已更改,但在任何一种情况下,到期时间都将被重置.同样,在同一天多次调用它只会导致第一次调用延长到期时间.*

If the access_token is generated from a server-side OAuth call, the resulting access_token will have the longer expiration time. If the call is made while there is still a valid access_token for that user, the returned access_token from this second call may be the same or may have changed, but in either case the expiration time will have been reset. Again, calling this multiple times during the same day will result only in the first call extending the expiration time.*

这似乎意味着服务器端 OAuth自动获得一个很长的到期令牌.如果我在 Facebook 开发人员高级对话框中启用弃用离线访问"设置,我确实发现这种情况 - 令牌将在 60 天后过期.但是设置关闭令牌会在 2 小时后过期.

This would seem to imply that Server-side OAuth automatically gets a long expiration token. I do find this to be the case if I enable the "deprecate offline access" setting in the Facebook Developer advanced dialog - The token expires in 60 days. But with the setting off the token expires in 2 hours.

我对这个设置的要点有点困惑:

I'm a little confused about the point of this setting:

问题:

  • 这个设置听起来像是一个过渡/迁移"选项......如果我启用此选项从现在起 6 个月后我还会获得 60 天的代币吗?不使用交换"端点?

  • The setting sounds like a "transitionary/migratory" option.... If I enable this option will I still get 60 day tokens 6 months from now? without using the "exchange" endpoint?

为什么不自动将所有令牌设置为 60 天?

Why not just automatically set all tokens to 60 days?

推荐答案

Facebook 应用程序迁移设置的重点是让开发人员能够提前在他们的应用程序中测试新功能(或弃用旧功能)并发现错误可能会出现.如开发者路线图所示,offline_access 权限将于 5 月 1 日移除,届时,每个应用程序将就像您正在测试的迁移设置已启用一样.

The point of migration settings for Facebook apps is to enable developers to test new features (or deprecation of old features) ahead of time in their apps and spot bugs that may arise. AS indicated on the Developer Roadmap, offline_access permission will be removed on May 1st and at that point, every app will act as if the migration setting you are testing is enabled.

您可以在此处找到有关此更改的更多信息:https://developers.facebook.com/docs/offline-access-deprecation/

You can find more information about this change here: https://developers.facebook.com/docs/offline-access-deprecation/

我们不会在没有通知的情况下自动启用此功能的原因是它会导致许多应用程序崩溃.Facebook 有一个破坏性变更政策,它试图避免在没有90 天警告(在本例中为迁移设置).

The reason we do not automatically enable this without notice is because it would cause a lot of apps to break. Facebook have a breaking change policy which tries to avoid making those sorts of changes without a 90 day warning (and in this case, a migration setting).

离线访问权限删除被推迟到 10 月 3 日.

offline access permission removal was pushed back to Oct 3rd.

这篇关于Facebook 60 天访问令牌和已弃用的 Offline_Access的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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