在 django 项目中使用 facebook 登录时不存在用户匹配查询

User matching query does not exist while using facebook login in django project

我已经使用 django all auth 为我的网站设置了 facebook 的社交登录。我正在为 facebook 使用 JS_SDK 方法(而不是 oauth2)。

登录时,页面错误 "User matching query does not exist"。

完整的错误堆栈在这里:

    Traceback:
File "/home/aniket/python/insight_venv/local/lib/python2.7/site-packages /django/core/handlers/base.py" in get_response
111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/aniket/python/insight_venv/local/lib/python2.7/site-packages/allauth/socialaccount/providers/facebook/views.py" in login_by_token
77.                     ret = complete_social_login(request, login)
File "/home/aniket/python/insight_venv/local/lib/python2.7/site-packages/allauth/socialaccount/helpers.py" in complete_social_login
131.     sociallogin.lookup()
File "/home/aniket/python/insight_venv/local/lib/python2.7/site-packages/allauth/socialaccount/models.py" in lookup
251.             self.user = self.account.user
File "/home/aniket/python/insight_venv/local/lib/python2.7/site-packages/django/db/models/fields/related.py" in __get__
572.                 rel_obj = qs.get()
File "/home/aniket/python/insight_venv/local/lib/python2.7/site-packages/django/db/models/query.py" in get
357.                 self.model._meta.object_name)

Exception Type: DoesNotExist at /accounts/facebook/login/token/
Exception Value: User matching query does not exist.

谢谢丹尼尔弗兰卡。从社交帐户 table.

中删除相应的记录后,我能够修复它