FB 身份验证从粉丝专页转到应用程序页面,而不是返回粉丝专页

发布于 2025-01-07 08:35:24 字数 181 浏览 6 评论 0原文

我正在使用 php 并在不同的粉丝页面上运行我的应用程序,但是当新用户进行身份验证时,它总是在身份验证后将他们重定向到应用程序页面。 我确实尝试从 $signed_request 获取粉丝页面 ID 和名称,但失败了,因为需要先进行身份验证,所以我无法重定向回粉丝页面。 如果有人知道我如何让应用程序从粉丝页面进行身份验证并返回那里,我将非常感激。

I'm using php and running my app on different fanpages but when a new users goes to authenticate it always redirects them to the app page after authentication.
I did try getting the fanpage id and name from $signed_request but it fails because the authentication needs to go first so I can't redirect back to the fan page.
If anyone knows how I can get an app to authenticate from a fanpage and go back there I would be extremely grateful.

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

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

发布评论

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

评论(1

客…行舟 2025-01-14 08:35:24

Facebook 将 signed_request POST 到您的应用(无论是在页面选项卡中还是在画布中)。因此,在捕获 signed_request 之前执行重定向会导致数据丢失。

解决方案:

  • 避免不必要的重定向。
  • 在重定向之前将 signed_request 保存到会话中,或者仅将其添加(作为查询字符串)用于下一个 URL

Facebook POST the signed_request to your app (whether it's in a page tab or canvas). So doing a redirect before capturing the signed_request would cause a loss of the data.

Solutions:

  • Avoid unnecessary redirects.
  • Save the signed_request to the session before the redirect or just add it (as a query string) for the next URL
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文