简体   繁体   English

Facebook身份验证,严格的OAuth模式:此URL的域不包含在应用程序的域中

[英]Facebook Authentication, Strict OAuth Mode: The domain of this URL isn't included in the app's domains

Got an issue, when I am trying to login with php sdk with Strict mode in OAuth section enabled. 当我尝试在启用了OAuth部分的严格模式下使用php sdk登录时遇到了一个问题。

So basically what I did so far: 所以基本上我到目前为止所做的是:

Created a fresh app, so I could test properly. 创建了一个新的应用程序,因此我可以正确地进行测试。

Where in: Settings->App Domains I've put sub.domain.com and domain.com 在哪里: 设置->应用程序域我已将sub.domain.comdomain.com

On the Products->Facebook Login->Settings I have entered the following valid OAuth Urls 在“ 产品”->“ Facebook登录”->“设置”中,我输入了以下有效的OAuth网址

https://sub.domain.com/fbtest/
https://sub.domain.com/fbtest/login.php
https://sub.domain.com/fbtest/fb-response.php

Then got the code from that page - copy/paste - except the $app_id and $app_secret and $redirect_to variables and a session_start() . 然后从该页面获取代码-复制/粘贴-除了$app_id$app_secret$redirect_to变量以及session_start()

https://developers.facebook.com/docs/php/howto/example_facebook_login https://developers.facebook.com/docs/php/howto/example_facebook_login

and constructed the pages above login.php and fb-response.php 并构建了login.phpfb-response.php之上的页面

I tested the app with Use Strict Mode for Redirect URIs set to No and as expected I got a Access Token on fb-response.php page. 我测试了将“用于重定向URI的使用严格模式”设置为“ 否”的应用程序,并按预期在fb-response.php页面上获得了访问令牌。

When I selected the Use Strict Mode for Redirect URIs to Yes though, I got the following Exception message 当我选择对重定向URI使用严格模式为 是”时,收到以下异常消息

Can't load URL: The domain of this URL isn't included in the app's domains. 无法加载URL:此URL的域未包含在应用程序的域中。 To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings. 为了能够加载此URL,请将应用程序的所有域和子域添加到应用程序设置的“应用程序域”字段中。

The domains in the example are real and online. 该示例中的域是真实的并且在线的。

I double checked all the fields on the app, but they seems ok to me, so I am stuck so any help is much appreciated! 我仔细检查了该应用程序中的所有字段,但对我来说它们似乎还不错,所以我被困住了,因此不胜感激!

Actually, this was a bug in the facebook graph-php package. 实际上,这是facebook graph-php包中的错误。 The version 5.6.2 will fix this issue. 版本5.6.2将解决此问题。

https://github.com/facebook/php-graph-sdk/issues/939#issuecomment-365780367 https://github.com/facebook/php-graph-sdk/issues/939#issuecomment-365780367

暂无
暂无

声明:本站的技术帖子网页,遵循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 Auth:无法加载URL:此URL的域未包含在应用的域中 - Facebook Auth: 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 Facebook App - 此URL的域名未包含在应用程序的域中。 为什么? - Facebook App - The domain of this URL isn't included in the app's domains. Why? 图表返回错误:无法加载网址:此网址的域未包含在应用的域中 - 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登录:该应用程序的域中未包含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 canvas应用程序身份验证重定向到我的域 - Facebook canvas app authentication redirects to my domain 2个域1个主机->域URL重写 - 2 domains 1 host -> domain url rewrite
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM