简体   繁体   中英

Facebook login showing error when try to test on the localhost

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 is http://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.

You should create a 'Test app' on facebook. you should have a look at this related answer. https://stackoverflow.com/a/33131470/2405066

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM