In this post, I’d love to share with you guys a solution to fix the Facebook login error which could happen for social login function with Facebook. The exact error message is:

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 sub-domains of your app to the App Domains field in your app settings.

The error message popup dialog looks like this:

Error Message

To solve this Facebook login error, sign in your Facebook Developers home page (https://developers.facebook.com), click menu My Apps at top right corner of the page. Select your Facebook App that has the problem, and click Settings under Facebook Login, as shown below:

Access Facebook Login Settings

The under the Client OAuth Settings section, type the following redirect URL into the text field Valid OAuth Redirect URIs:

https://localhost/login/oauth2/code/facebook

This is for localhost (use http:// if you don’t have SSL setup for localhost). You may need to use your own domain name:

https://yourdomain/login/oauth2/code/facebook

It should look like below:



Valid Redirect URIs

Click Save Changes. And test social login with Facebook again. It should be working now. Enjoy!

To watch the steps to fix this Facebook login error, kindly check this video:

 

Related Articles:


About the Author:

is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on Facebook and watch his Java videos you YouTube.



Add comment

   


Comments 

#3Garvin2022-05-13 16:06
Helpful Article, Thanks
Quote
#2Mohamd2022-03-03 06:28
still have Error
Can't load URL: The domain of this URL isn't included in the app's domains.
Quote
#1Tamim Wasif2021-12-17 07:47
not working....
i have done what u said here
Quote