如何在服务器名称之间共享访问令牌? (www 与非 www)

发布于 2024-12-27 10:11:45 字数 144 浏览 4 评论 0原文

我目前正在通过网站开发一个应用程序,Facebook 返回的令牌只会在确切的 URL 的会话中。换句话说,如果用户点击 site.com 并登录,则令牌仅适用于 site.com。如果用户尝试手动输入 www.site.com,则令牌不适用。

有什么想法吗?

I am currently developing an app via website and the token that Facebook returns back will only be in session for the exact url. In other words, if a user hits site.com and logs in, the token only works for site.com. If the user tries to manually type in www.site.com, the token does not apply.

Any ideas?

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

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

发布评论

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

评论(1

枕花眠 2025-01-03 10:11:45

access_token 不绑定到域。您甚至可以在此处使用有效的用户令牌:https://developers.facebook.com/tools/explorer 尝试一下。您甚至可以使用它通过桌面应用程序在图表中执行操作。

您正在使用的应用程序可能正在设置会话 cookie,但它可能与域绑定,这可能是问题的根源。

The access_token is not tied to a domain. You can even use a valid user token here: https://developers.facebook.com/tools/explorer Give it a try. You can even use it to do things in the graph via a desktop application too.

The app you're using might be setting a session cookie, and that might be tied to a domain though, and that may be the source of your issues.

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