Skip to content

Instantly share code, notes, and snippets.

@milin
Created March 29, 2011 18:29
Show Gist options
  • Select an option

  • Save milin/892943 to your computer and use it in GitHub Desktop.

Select an option

Save milin/892943 to your computer and use it in GitHub Desktop.
if ('oauth_verifier' not in request.GET):
client = oauth.Client(consumer)
resp, content = client.request(request_token_url, "GET")
request_token = dict(urlparse.parse_qsl(content))
roauth_token = request_token['oauth_token']
roauth_token_secret = request_token['oauth_token_secret']
request.session['roauth_token'] = roauth_token
request.session['roauth_token_secret'] = roauth_token_secret
new_authorize_url = authorize_url+'?oauth_token='+request_token['oauth_token']
return HttpResponseRedirect(new_authorize_url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment