【发布时间】:2013-05-07 15:09:13
【问题描述】:
我在网站开发中使用django-allauth 进行 Facebook 身份验证,并进行了相应设置:
在 facebook 上的 facebook 应用设置中:
Namespace: test_login
App Domains: blank
Site URL: http://127.0.0.1:8000/
Canvas URL: http://127.0.0.1:8000/
Secure Canvas URL: https://127.0.0.1:8000/
在 Django admin 中,我创建了新的社交应用程序:
Provider: Facebook
name: test_login
client_id: xxx
Secret: xxx
Sites: http://127.0.0.1:8000/
如您所见,我添加了一个新站点 http://127.0.0.1:8000/ 而不是 example.com。
settings.py 中的 SITE_ID 是正确的。
所以一切都应该正常工作,但事实并非如此。点击通过 Facebook 登录后,我得到了
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 进行测试。
【问题讨论】:
-
我已经两天没碰这个了,现在可以了。脸书万岁。问题已解决(自行解决)。
标签: django facebook django-allauth