我目前一直在尝试编写一个与社交平台集成的简单 Django 应用程序。我决定使用插件 django-socialregistration 连接到 Facebook 帐户。我遵循了http://django-socialregistration.readthedocs.org/en/latest/上的安装指南。
应用程序显示按钮,单击它后重定向到 facebook 登录页面,显示请求对话框,最后出现以下错误:
KeyError at /social/facebook/callback/
'access_token'
Request Method: GET
Request URL: http://somehost:8000/social/facebook/callback/?code=
[here comes long code]
Django Version: 1.3.1
Exception Type: KeyError
Exception Value:
'access_token'
Exception Location: /usr/lib/python2.7/site-packages/
django_socialregistration-0.5-py2.7.egg/socialregistration/clients/oauth.py in get_access_token, line 273
很抱歉发布类似错误消息的问题,但我完全不知道如何解决它。
多谢,
托梅克