gpt4 book ai didi

java - 扩展 Facebook 访问 token 的服务器端非用户交互方式

转载 作者:行者123 更新时间:2023-11-30 04:20:19 24 4
gpt4 key购买 nike

我有一个 Web 应用程序,用户可以将我们的网站链接到他们的 Facebook 帐户,以便我们可以将内容发布到他们的墙和粉丝页面。我们之前使用的是offline_access 参数,但现在它已停用,并且我们所有用户的访问 token 将在 60 天后过期。在我看来,我们所有的用户都必须在 60 天后重新链接他们的 Facebook 帐户。有什么方法可以自动刷新访问 token 而无需用户交互吗?

最佳答案

据我了解,目前任何访问 token 的最长生命周期都是 60 天。用户必须每 60 天周期重新验证您的 Facebook 应用程序(或者如果他们因任何其他原因删除访问权限)。

Even the long-lived access token will eventually expire. At any point, you can generate a new long-lived token by sending the person back to the login flow used by your app - note that the person will not actually need to login again, they have already authorized your app, so they will immediately redirect back to your app from the login flow with a refreshed token - how this appears to the person will vary based on the type of login flow that you are using, for example if you are using the JavaScript SDK, this will take place in the background, if you are using a server-side flow, the browser will quickly redirect to the Login Dialog and then automatically and immediately back to your app again.

来源:

http://developers.facebook.com/roadmap/offline-access-removal/ http://developers.facebook.com/docs/facebook-login/access-tokens/#extending

关于java - 扩展 Facebook 访问 token 的服务器端非用户交互方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17199338/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com