Welcome

High quality MyBB plugins at your disposal

Hi, I am a passionate developer with modernity and simplicity in mind. MyBBoost is my mansion where you can download my plugins and themes, other than receiving support for them. Several free plugins are available as well as premium ones, all compatible with the latest MyBB releases. You can purchase and download items singularly or purchase a lifetime subscription including a combination of premium plugins and:

  • Priority support
  • Future plugins access
  • Total refund if not satisfied 1
1 Terms and conditions apply. For more informations, read the EULA.

Error 191 "can't load URL" using facebook login app

  • 1
  • 2
Ivan Vysotskyi Regular user 25 Aug 2017
#1
I am trying to establish logging in on my myBB forum by facebook. But it constantly gives an error

"Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings."

I am sure that I've listed my domain in "App Domains" list (see screenshot). Could you please help me to investigate what exactly is wrong?

You can try it here https://forum.avangard.org.ua/ . It gives error in ukrainian language because I am from Ukraine but it's easy to find translation.

I am sure that I configured app secret and id correctly.

Sreenshots of facebook app config:
[Image: fU6Scev.png][Image: vrCxRTo.png][Image: FZBvyNU.png][Image: IUWusux.png][Image: vzJWSPJ.png]

Will be grateful for any help.

regards,
Ivan
Shade Administrator 25 Aug 2017
#2
Hello, thank you for using my plugins. In Valid OAuth redirect URIs, just add the forum domain. The issue is most likely linked to that. If I'm not mistaken, you could as well leave it empty.
Ivan Vysotskyi Regular user 27 Aug 2017
#3
Hello, Facebook doesn't allow me to leave it empty.
I've just tried it with https://forum.avangard.org.ua/myfbconnec...n=do_login - it doesn't work

With https://forum.avangard.org.ua/myfbconnec...n=do_login and https://forum.avangard.org.ua/ it doesn't work

With https://forum.avangard.org.ua/ it doesn't work.

If I type there something wrong like https://forum.avangard.org.ua/blablabla, another error appear, on facebook site it shows a message "URL is blocked"
Shade Administrator 27 Aug 2017
#4
Try to enter the domain, without the forum subdomain.
Ivan Vysotskyi Regular user 27 Aug 2017 Edited
#5
[Image: ViSXxsU.png]

If I type something instead of "https://forum.avangard.org.ua/myfbconnect.php?action=do_login" it shows an error (screenshot).

Why do you think it could work for "avangard.org.ua"? It's a completely different site. If I had site smth.us.com should I print just "us.com" in the redirect url field?

I understand now that my issue is not typical and I should insert trace statements into php code and debug it mysef.

thank you for replies.
Shade Administrator 27 Aug 2017 Edited
#6
This is certainly not a fault of the code, but a fault of the app configuration. You won't go far by adding stack traces randomly, the error is on Facebook's side.

"forum" should be the subdomain, adding the primary domain should whitelist all the subdomains.

Try to add the site WITHOUT the https prefix (like: forum.avangard.org.ua).
Ivan Vysotskyi Regular user 28 Aug 2017 Edited
#7
I did it and when press "Save changes" , facebook replaced it with http(not https) and gives the same error 191. I also tried to add both http://forum.... and https://forum.... to redirect url and it doesn't work.[Image: Hw1wESK.png]
Content of xml bugreport:
<?xml version="1.0" encoding="UTF-8"?>
<report name="MyFacebook Connect" version="3.2">
<id>32</id>
<dateline>1503730447</dateline>
<code>191</code>
<file>/home/avangard.org.ua/forum/myfbconnect/src/Facebook/Exceptions/FacebookResponseException.php</file>
<line>131</line>
<message>{translated from Ukrainian}Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.</message>
<trace> /home/relliart/avangard.org.ua/forum/myfbconnect/src/Facebook/FacebookResponse.php(210): Facebook\Exceptions\FacebookResponseException::create(Object(Facebook\FacebookResponse))
# 1 /home/relliart/avangard.org.ua/forum/myfbconnect/src/Facebook/FacebookResponse.php(255): Facebook\FacebookResponse->makeException()
# 2 /home/relliart/avangard.org.ua/forum/myfbconnect/src/Facebook/FacebookResponse.php(82): Facebook\FacebookResponse->decodeBody()
# 3 /home/relliart/avangard.org.ua/forum/myfbconnect/src/Facebook/FacebookClient.php(225): Facebook\FacebookResponse->__construct(Object(Facebook\FacebookRequest), '{"error":{"mess...', 400, Array)
# 4 /home/relliart/avangard.org.ua/forum/myfbconnect/src/Facebook/Authentication/OAuth2Client.php(277): Facebook\FacebookClient->sendRequest(Object(Facebook\FacebookRequest))
# 5 /home/relliart/avangard.org.ua/forum/myfbconnect/src/Facebook/Authentication/OAuth2Client.php(226): Facebook\Authentication\OAuth2Client->sendRequestWithClientParams('/oauth/access_t...', Array)
# 6 /home/relliart/avangard.org.ua/forum/myfbconnect/src/Facebook/Authentication/OAuth2Client.php(166): Facebook\Authentication\OAuth2Client->requestAnAccessToken(Array)
# 7 /home/relliart/avangard.org.ua/forum/myfbconnect/src/Facebook/Helpers/FacebookRedirectLoginHelper.php(22Hell yeah: Facebook\Authentication\OAuth2Client->getAccessTokenFromCode('AQCEixImMZjvP9o...', 'https://forum.a...')
# 8 /home/relliart/avangard.org.ua/forum/inc/plugins/MyFacebookConnect/class_facebook.php(127): Facebook\Helpers\FacebookRedirectLoginHelper->getAccessToken()
# 9 /home/relliart/avangard.org.ua/forum/myfbconnect.php(63): MyFacebook->save_token()
# 10 {main}</trace>
</report>

It would be great to get screenshots of app configuration from people who have https site and this plugin works on it. Then I could compare my settings and maybe find a mistake.

Also while installation of plugin I had a message that it was unable to connect to 443 port of localhost. But I forced installation. Can it be the issue? I contacted hosting provider and was told that 443 port is open on my site. Can I test 443 port somehow?
Shade Administrator 28 Aug 2017
#8
Maybe you've got to add both your primary domain and your subdomain (forum.). I would like to help you further but my FB account is locked at the moment and I have got no time to gain control over it.
Ivan Vysotskyi Regular user 2 Sep 2017 Edited
#10
Facebook developer found a bug in your plugin.

Here:
https://github.com/Shade-/MyFacebook-Con...k.php#L127

I replaced line 127 with following:
$access_token = $helper->getAccessToken($this->fallback);

and it fixed problem for me. The problem is that you pass null to getAccessToken and it remains null that's why facebook said that it was not a valid url:
https://github.com/facebook/php-graph-sd...r.php#L215

If will patch your code locally on my site and will wait for plugin update.

Thank you for looking into issue.
  • 4 participants