I am trying to integrate facebook login for my test website. I am hosting my website on my local machine at http:///127.0.0.1:8000. My redirect url is http://127.0.0.1:8000/home. But when I try to login from my facebook account (from the same machine) it throws:
"URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs."
and "Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."
Under the Basic settings App Domains contain 127.0.0.1:8000 and Site URL is http://127.0.0.1:8000/ ( I have also tried without the trailing '/'). Under Advanced Settings Server IP whitelist has 127.0.0.1 and Valid Oauth redirect URIs ishttp://127.0.0.1:8000/home. And under Client OAuth Settings everything is set to Yes. I have no idea what I am doing wrong. Is it because I am hosting my website on my local host ? Thanks in advance.
Asked
Active
Viewed 616 times
0
sajid
- 807
- 1
- 9
- 23
1 Answers
0
You should create a 'Test app' on facebook. you should have a look at this related answer. https://stackoverflow.com/a/33131470/2405066
-
As I mentioned in my question Site URL is http://127.0.0.1:8000/. I have also tried http://127.0.0.1:8000/ and http://127.0.0.1:8000 – sajid Mar 20 '16 at 23:44
-
@user3708999 you should read the answer and your comment again – techblu3 Mar 20 '16 at 23:51
-
Thanks ! I did not see the last answer – sajid Mar 20 '16 at 23:56
-
No. I have tried all possible options. At last tried changing the host file to set my.web.com at 127.0.0.1 Still did not work. – sajid Mar 21 '16 at 00:24
-
Please check here: https://stackoverflow.com/questions/2459728/how-to-test-facebook-connect-locally/33131470#33131470 – Nayana Chandran May 11 '20 at 14:31