简体   繁体   English

Facebook Auth:无法加载URL:此URL的域未包含在应用的域中

[英]Facebook Auth: Can't Load URL: The domain of this URL isn't included in the app's domains

I know that this question has been asked previously in this link Facebook OAuth "The domain of this URL isn't included in the app's domain" , but the solution is not working for me. 我知道之前在此链接中已经提出过这个问题Facebook OAuth“此URL的域名未包含在应用程序的域中” ,但该解决方案对我不起作用。

It's showing the error like this: 它显示如下错误: 在此输入图像描述

I have included my domain in the app's domain of facebook api as well, The redirect url format that I am passing goes like this: https://example.com/clients/authorization/facebook/a1njk2nkll55343nlk4/page 我已将我的域名包含在facebook api的app域中,我传递的重定向url格式如下: https//example.com/clients/authorization/facebook/a1njk2nkll55343nlk4/page

Here the random characters after facebook/ is the id of the client which is dynamic. 这里facebook /之后的随机字符是动态客户端的id。

Moreover, I am having the same problem while logging through facebook as well. 此外,我在登录Facebook时遇到同样的问题。

Thank You. 谢谢。

This might be the problem due to the security update of Facebook API. 由于Facebook API的安全更新,这可能是问题。

This is from Facebook developer dashboard! 这是来自Facebook开发者仪表板!

"In March, we're making a security update to your app settings that will invalidate calls from URIs not listed in the Valid OAuth redirect URIs field" “在3月份,我们正在对您的应用设置进行安全更新,这将使来自有效OAuth重定向URI字段中未列出的URI的调用无效”

So, for that Add your site's callback url in the Valid OAuth redirect URIs field 因此,为此在“有效OAuth重定向URI”字段中添加您网站的回调网址

You need to add your oAuth Redirect URI properly in the Facebook Login->Settings: Valid OAuth Redirect URIs In Valid OAuth Redirect URIs, You can include the uri in this format: https://example.com/clients/authorization/facebook 您需要在Facebook登录 - >设置:有效OAuth重定向URI中正确添加oAuth重定向URI在有效的OAuth重定向URI中,您可以使用以下格式包含uri: https//example.com/clients/authorization/facebook

And the redirect uri while authenticating can be as follow: https://example.com/clients/authorization/facebook&a1njk2nkll55343nlk4/page 在进行身份验证时重定向uri可以如下所示: https//example.com/clients/authorization/facebook&a1njk2nkll55343nlk4/page

Here "&" separates your required other parameters. 这里“&”分隔您所需的其他参数。

The same case applies for facebook Login. 同样的情况适用于Facebook登录。 Add your full login redirect uri to the Valid OAuth Redirect URIs. 将完整登录重定向uri添加到有效OAuth重定向URI。 Like this: 像这样:

https://example.com/login/facebook/callback https://example.com/login/facebook/callback

Hope This helps. 希望这可以帮助。

Thanks. 谢谢。

A dynamic URL Redirect is not supported by the current behavior. 当前行为不支持动态URL重定向。

This is due to a change to the handling of redirect URIs, announced in December 2017, and taking effect this month, Enabling strict mode is required in order to use OAuth redirects: 这是由于2017年12月宣布的重定向URI处理方式发生变化,并于本月生效,因此需要启用严格模式才能使用OAuth重定向:

https://developers.facebook.com/blog/post/2017/12/18/strict-uri-matching/ https://developers.facebook.com/blog/post/2017/12/18/strict-uri-matching/

Make sure to set App Domain in: 确保将App Domain设置为:

https://developers.facebook.com/apps/[your-app-ip]/settings/basic/ https://developers.facebook.com/apps/[your-app-ip]/settings/basic/

Also all you callback urls including the https:// Please see: 还有你回调的网址,包括https://请参阅:

https://developers.facebook.com/apps/[your-app-ip]/fb-login/settings/ https://developers.facebook.com/apps/[your-app-ip]/fb-login/settings/

  • If you are using the PHP SDK, please ensure you have the latest version installed (v5.6.2). 如果您使用的是PHP SDK,请确保安装了最新版本(v5.6.2)。

I had issues with this. 我有这个问题。 Noticed that after moving to https:// it still redirects to http:// after long hours of looking into fb sdk found that they had issues detecting if your site is secure. 注意到在转移到https://后,它仍然会重定向到http://经过长时间查看fb sdk后发现他们在检测到您的网站是否安全时遇到问题。

So, on file 所以,存档

facebookd-v5.*-sdk/Url/FacebookUrlDetectionHandler.php update two functions. facebookd-v5。* - sdk / Url / FacebookUrlDetectionHandler.php更新两个函数。 Updated versions: 更新版本:

protected function protocolWithActiveSsl($protocol)
{
    $protocol = strtolower((string)$protocol);

    return in_array($protocol, ['on', '1', 'https', 'ssl', 'https, https'], true);
}

and

protected function getHostName()
{
    ...

    // Don't append port number if a normal port.
    if (($scheme == 'http' && $port == '80') || ($scheme == 'https' && $port == '443') || ($scheme == 'https' && $port == '80')) {
        $appendPort = '';
    }

    return $host . $appendPort;
}

暂无
暂无

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

相关问题 Facebook 显示错误:无法加载 URL:此 URL 的域未包含在应用程序的域中 - Facebook showing error: Can't Load URL: The domain of this URL isn't included in the app's domains facebook登录名:无法加载URL:该URL的域未包含在应用程序的域中 - facebook login : Can't Load URL: The domain of this URL isn't included in the app's domains 图表返回错误:无法加载网址:此网址的域未包含在应用的域中 - Graph returned an error: Can't Load URL: The domain of this URL isn't included in the app's domains 无法加载 URL:此 URL 的域未包含在应用程序的域中。 为了能够加载这个 URL... Codeigniter - Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL… Codeigniter Facebook App - 此URL的域名未包含在应用程序的域中。 为什么? - Facebook App - The domain of this URL isn't included in the app's domains. Why? Facebook身份验证,严格的OAuth模式:此URL的域不包含在应用程序的域中 - Facebook Authentication, Strict OAuth Mode: The domain of this URL isn't included in the app's domains Facebook登录:该应用程序的域中未包含URL! 我收到错误> FacebookClient.php中的可捕获致命错误 - Facebook Login: URL isn't included in the app's domains! I get error > Catchable fatal error in FacebookClient.php 无法加载网址:此网址的域未包含在应用程序的域中 - Unable to load URL: This URL's domain is not included in the app's domain 由于安全的画布网址,无法注册Facebook应用 - Can't register facebook app because of secure canvas url URL 正则表达式验证:如果 URL 中没有 3 个 W,则拒绝 - URL regexp validation: deny if there isn't 3 W's in URL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM