如何随时使用facebook的access_token?

发布于 2024-12-27 13:59:20 字数 152 浏览 3 评论 0原文

使用范围授权后:offline_access。即使用户几天前使用 access_token 注销,也可以通过应用程序随时发布到墙上或执行任何其他允许的操作? 我问,因为后来我无法发布到墙上,Facebook 不允许这样做。

After authorization with scope : offline_access. It is possible via application to post to wall, or perform any other allowed operations at any time, even if user was logged out some days ago, using the access_token?
I'm asking, because I couldn't post to wall after later, facebook does not allow that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤独患者 2025-01-03 13:59:20

Facebook 将返回代码值,借助该代码值,您可以获得 access_token,您必须将其存储在数据库中以供将来使用。该访问令牌没有到期日,因此您可以在将来随时使用它。

在从您的应用程序授予访问权限后,用户可能会删除在其墙上发帖的权限。但它会再次询问该用户下次何时访问该应用程序。

谢谢!

Facebook will return the code value and with the help of of that you can get the access_token which you must have to store in database for future use. That access token has no expiry date so you can use that any time in future.

It can be possible that user might have remove permission to posting on his wall after granting the access from your application. but it will going to ask that user again when he's going to access the app next time.

Thanks!

往昔成烟 2025-01-03 13:59:20

您遇到的错误是什么? Offline_access 提供具有无限生命周期的访问令牌,除非用户更改密码或删除您的应用程序。所以你需要保存这个离线令牌(虽然不推荐-安全)并在以后使用它。

What is the error that you are getting? offline_access give an access token with infinite lifetime unless the user changes the password or removes your app. So you need to save this offline token (although not recommended-security) and use it later on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文