django-socialregistration access_token错误

时间:2011-12-21 18:31:18

标签: django facebook django-facebook

我一直在尝试用社交平台集成编写一个简单的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

抱歉发布类似错误消息的问题,但我完全不知道如何解决它。

非常感谢,

托梅克

1 个答案:

答案 0 :(得分:1)

嗯,因为我是作者,所以我有偏见,但你尝试过: https://github.com/tschellenbach/Django-facebook 我们使用它相当庞大的生产环境,效果很好。

如果您只需要Facebook,则只有一个选项。

相关问题