[英]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.com
和domain.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.php
和fb-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.