Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

KeyError when logging in with Twitter #50

christopherhan opened this Issue Sep 28, 2011 · 0 comments


None yet
2 participants

I'm receiving the same errors as these issues:

The fix mentioned is to set a callback URL in the app's Twitter settings. I've set my callback URL, but I still receive the error. My app has been in production for about 6 months without any login issues, and now this issue has surfaced in the past two weeks. Did Twitter change the OAuth flow?

Here's my traceback:


Request Method: GET
Request URL: http://thematic.me/accounts/twitter_login/
Django Version: 1.2.3
Python Version: 2.6.5
Installed Applications:
Installed Middleware:

File "/home/chr15/webapps/thematic_prod/lib/python2.6/django/core/handlers/base.py" in get_response

  1.                 response = callback(request, _callback_args, *_callback_kwargs)
    File "/home/chr15/webapps/thematic_prod/proj/genoa/socialauth/views.py" in twitter_login
  2. request_token = twitter.fetch_request_token(callback=request.build_absolute_uri(reverse('socialauth_twitter_login_done')))
    File "/home/chr15/webapps/thematic_prod/proj/genoa/socialauth/lib/oauthtwitter2.py" in fetch_request_token
  3.     return oauth.OAuthToken.from_string(oauth_response(oauth_request))
    File "build/bdist.linux-i686/egg/oauth/oauth.py" in from_string
  4.     key = params['oauth_token'][0]

Exception Type: KeyError at /accounts/twitter_login/
Exception Value: 'oauth_token'

@shabda shabda closed this Sep 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment