此网址的域名未包含在应用的域中。 (子域!)

此网址的域名未包含在应用的域中。  (子域!)

问题描述:

my question is the same as this:

Facebook App - The domain of this URL isn't included in the app's domains. Why?

except that my url is: http://ccc.nnn.hhh.hu

The settins on fb, "facebook login":

Client OAuth Login: ON

Web OAuth Login: ON

Valid OAuth Redirect URIs: http://ccc.nnn.hhh.hu/my.php

strict mode is ON (cannot be disabled)

At basic:

App Domains: http://ccc.nnn.hhh.hu

so, when trying to login, the facebook dialogs asks for the username and password, so far so good. And then I get an exception for this:

$fb = new Facebook\Facebook([
    'app_id' => aeaeae,
    'app_secret' => rrrrr,
    'default_graph_version' => 'v2.5'
]);

$helper = $fb->getRedirectLoginHelper();
$accessToken = $helper->getAccessToken();

and I wont get the $accessToken but the execption:

The domain of this URL isn't included in the app's domains.

我的问题与此相同: p>

Facebook App - The 此网址的域名未包含在应用的域中。 为什么? p> blockquote>

除了我的网址是: http://ccc.nnn.hhh.hu code> p >

建立在fb上,“facebook登录”: p>

客户端OAuth登录:开启 p>

Web OAuth登录:开启 p>

有效的OAuth重定向URI: http:// ccc。 nnn.hhh.hu/my.php p>

严格模式为ON(无法禁用) p>

基本: p >

应用程序域: http://ccc.nnn.hhh.hu p>

所以,在尝试登录时,facebook对话框会询问用户名和密码,到目前为止一切都很好。 然后我得到一个例外: p>

  $ fb = new Facebook \ Facebook([
'app_id'=> aeaeae,
'app_secret'=>  rrrrr,
'default_graph_version'=>'v2.5'
]); 
 
 $ helper = $ fb-> getRedirectLoginHelper(); 
 $ accessToken = $ helper-> getAccessToken();  
  code>  pre> 
 
 

我不会得到$ accessToken而是execption: p>

此网址的域名不包含在 应用的域名。 p> div>

Right, you have to upgrade the sdk to "5.6.2" to support strict mode.

Facebook is forcing strict mode by default now, and that implies that we should use a standard redirect URL, or declare our old custom URI in the Valid Oauth redirect URIs list. See:

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

So, apart from upgrading the sdk, you guys want to add your custom URI in the list to support legacy app flows.

ok, solved.

I was using "5.4.2" and upgraded to "5.6.2".