Facebook客户端OAuth设置域无法使用查询字符串

发布于 2025-01-17 20:31:08 字数 744 浏览 4 评论 0原文

我正在尝试使Auth与Facebook合作,但它一直告诉我我的重定向URL无法正常工作。

有效的Oauth重定向uris 我有以下

 https://localhost

问题是,我将一些其他查询字符串传递给我的回调,例如

 https://localhost?uuid=something&service=my_service

尝试验证时,我确实会得到请求弹出窗口,然后我得到了重定向URL,但后来Facebook告诉我不允许使用URL。

如果我测试https:// localhost?uuid = severy& service = my_service 重定向uri uli验证器它告诉我这是无效的,

我该如何有效添加AA URL,包括动态查询字符串?我已经尝试过,

 https://localhost*

但是Facebook告诉我这不是一个有效的URL,并且不会让我保存/添加此URL。

I'm trying to get the Auth working with Facebook but it keeps on telling me that my redirect URL is not working.

In the Valid OAuth Redirect URIs I have the following

 https://localhost

The issue is that, I'm passing some additional query string to my callback, like

 https://localhost?uuid=something&service=my_service

When attempting to Auth, I do get the request popup and then I get a redirect URL but then Facebook is telling me that the URL is not allowed.

facebook error

If I test https://localhost?uuid=something&service=my_service in Facebook's Redirect URI Validator it's telling me it's not valid

How can I add a a URL including a dynamic query string ? I've tried

 https://localhost*

But Facebook is telling me this is not a valid URL and won't let me save/add this URL.

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

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

发布评论

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

评论(1

素染倾城色 2025-01-24 20:31:08

@ceejayoz使我走上正确的轨道,我会回答自己的问题,这可能对别人有所帮助。

其他数据必须以状态参数(例如)传递

 $data = json_encode($some_std_class);
 $pdata = $fb_helper->getPersistentDataHandler();
 $pdata->set('state', $data);
 $login_url = $fb_helper->getLoginUrl($my_url, $my_permissions);

@ceejayoz put me on the right track, I will answer my own question, that might help someone else.

Additional data must be passed in a state parameter such as

 $data = json_encode($some_std_class);
 $pdata = $fb_helper->getPersistentDataHandler();
 $pdata->set('state', $data);
 $login_url = $fb_helper->getLoginUrl($my_url, $my_permissions);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文