1

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.

John Smith
  • 6,129
  • 12
  • 68
  • 123

2 Answers2

1

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.

mayid
  • 1,644
  • 15
  • 23
0

ok, solved.

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

John Smith
  • 6,129
  • 12
  • 68
  • 123