Django | django-socialregistration error
Posted
by MMRUser
on Stack Overflow
See other posts from Stack Overflow
or by MMRUser
Published on 2010-04-15T17:49:15Z
Indexed on
2010/04/15
17:53 UTC
Read the original article
Hit count: 639
I'm trying to add the facebook connect feature to my site, I decided to use django socialregistration.All are setup including pyfacebook, here is my source code.
settings.py
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'facebook.djangofb.FacebookMiddleware',
'socialregistration.middleware.FacebookMiddleware',
)
urls.py
(r'^callback/$', 'fbproject.fbapp.views.callback'),
views.py
def callback(request):
return render_to_response('canvas.fbml')
Template
<html>
<body>
{% load facebook_tags %}
{% facebook_button %}
{% facebook_js %}
</body>
</html>
but when I point to the URL, I'm getting this error
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py", line 279, in run
self.result = application(self.environ, self.start_response)
File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py", line 651, in __call__
return self.application(environ, start_response)
File "C:\Python26\lib\site-packages\django\core\handlers\wsgi.py", line 241, in __call__
response = self.get_response(request)
File "C:\Python26\lib\site-packages\django\core\handlers\base.py", line 73, in get_response
response = middleware_method(request)
File "build\bdist.win32\egg\socialregistration\middleware.py", line 13, in process_request
request.facebook.check_session(request)
File "C:\Python26\lib\site-packages\facebook\__init__.py", line 1293, in check_session
self.session_key_expires = int(params['expires'])
ValueError: invalid literal for int() with base 10: 'None'
Django 1.1.1 *Python 2.6.2*
© Stack Overflow or respective owner