简体   繁体   English

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

[英]Facebook Client OAuth settings domain not working with query strings

I'm trying to get the Auth working with Facebook but it keeps on telling me that my redirect URL is not working.我试图让授权与 Facebook 一起工作,但它一直告诉我我的重定向 URL 不工作。

In the Valid OAuth Redirect URIs I have the following有效的 OAuth 重定向 URI中,我有以下内容

 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.尝试进行身份验证时,我确实收到请求弹出窗口,然后收到重定向 URL,但随后 Facebook 告诉我不允许使用 URL。

脸书错误

If I test https://localhost?uuid=something&service=my_service in Facebook's Redirect URI Validator it's telling me it's not valid如果我在 Facebook 的重定向 URI 验证器中测试https://localhost?uuid=something&service=my_service它告诉我它无效

How can I add aa URL including a dynamic query string?如何添加 aa URL 包括动态查询字符串? 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.但是 Facebook 告诉我这不是有效的 URL,并且不允许我保存/添加这个 URL。

@ceejayoz put me on the right track, I will answer my own question, that might help someone else. @ceejayoz 让我走上正轨,我会回答我自己的问题,这可能会对其他人有所帮助。

Additional data must be passed in a state parameter such as必须在state参数中传递附加数据,例如

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Facebook登录测试主机时“客户端OAuth设置中的URL未列入白名单” - “Given URL is not whitelisted in Client OAuth Settings” on Facebook login at a test host Facebook oauth client_id检索的令牌在获取提要中不起作用 - Facebook oauth client_id retrived token not working in getting feeds Facebook登录消息:“ URL被阻止:此重定向失败,因为该重定向URI未在应用程序的客户端OAuth设置中列入白名单。” - Facebook login message: “URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings.” Facebook API:/ oauth / access_token无效 - Facebook API: /oauth/access_token not working oauth2-client for Google在Codeigniter工作 - oauth2-client for Google working in Codeigniter 用Facebook进行认证 - oauth with facebook 301重定向不适用于查询字符串 - 301 redirects not working for query strings Facebook“代码”参数作为OAuth身份验证查询字符串的一部分 - Facebook 'code' parameter as part of query string for OAuth authentication 使用Facebook SDK feed的php-custom隐私设置不起作用 - php-custom privacy settings with Facebook SDK feed post not working Facebook登录无法正常工作php sdk 3.0 oauth2.0 - facebook login not working php sdk 3.0 oauth2.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM