Facebook登录显示错误时尝试在本地主机上进行测试


Facebook login showing error when try to test on the localhost

我正在尝试为我的测试网站集成Facebook登录。我正在http:///127.0.0.1:8000的本地计算机上托管我的网站。我的重定向网址是http://127.0.0.1:8000/home。但是当我尝试从我的 facebook 帐户(从同一台机器)登录时,它会抛出: "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.""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."在基本设置下,应用程序域包含127.0.0.1:8000并且站点URL http://127.0.0.1:8000/(我也尝试过没有尾随的"/")。在"高级设置"下,Server IP whitelist 127.0.0.1Valid Oauth redirect URIs http://127.0.0.1:8000/home。 在"客户端 OAuth 设置"下,所有内容都设置为 Yes . 我不知道我做错了什么。是因为我在本地主机上托管我的网站吗?提前谢谢。

您应该在Facebook上创建一个"测试应用程序"。 你应该看看这个相关的答案。https://stackoverflow.com/a/33131470/2405066

相关文章: