|
我们正在从facebook中检索长期访问令牌,但是我们需要自动续订此令牌,以便它不会每60天到期.
阅读文档说它只能使用端点交换短期令牌.
由于我们没有短期令牌,我们如何在不必每60天手动重新授权的情况下执行此服务器端?
无法延长令牌是不可能的.请参见此处的场景4
https://developers.facebook.com/roadmap/offline-access-removal/:
Using the new endpoint below,you will be able to extend the expiration time of an existing,non-expired,short-lived user access_token. Please note,the endpoint can only be used to extend the short-lived user access_tokens. If you pass an access_token that had a long-lived expiration time,the endpoint will simply pass that same access_token back to you without altering or extending the expiration time.
To get the long-lived user access_token simply pass your own client_id (your app_id),your app_secret,and the non-expired,short-lived access_token to the endpoint below. You will be returned a new long-lived user access_token; this access_token will exist in addition to the short-lived access_token that was passed into the endpoint. If you would like to refresh a still valid long-lived access_token,you will have to get a new short-lived user access_token first and then call the same endpoint below. The returned access_token will have a fresh long-lived expiration time,however,the access_token itself may or may not be the same as the previously granted long-lived access_token.
(编辑:安卓应用网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|