Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added oauth_verifier parameter which twitter wants or else example fa…

…ils with 401 Invalid OAuth verifier.
  • Loading branch information...
commit 695c5e37fe2bef5cffaf31b689f2722cdab05d00 1 parent 5cd5736
Ed Summers edsu authored simplegeo committed

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 README.md
4 README.md
Source Rendered
@@ -113,6 +113,7 @@ can be easily translated to a web application.
113 113 accepted = 'n'
114 114 while accepted.lower() == 'n':
115 115 accepted = raw_input('Have you authorized me? (y/n) ')
  116 + oauth_verifier = raw_input('What is the PIN? ')
116 117
117 118 # Step 3: Once the consumer has redirected the user back to the oauth_callback
118 119 # URL you can request the access token the user has approved. You use the
@@ -123,7 +124,8 @@ can be easily translated to a web application.
123 124 request_token['oauth_token_secret'])
124 125 client = oauth.Client(consumer, token)
125 126
126   - resp, content = client.request(access_token_url, "POST")
  127 + resp, content = client.request(access_token_url, "POST",
  128 + body="oauth_verifier=%s" % oauth_verifier)
127 129 access_token = dict(urlparse.parse_qsl(content))
128 130
129 131 print "Access Token:"

0 comments on commit 695c5e3

Please sign in to comment.
Something went wrong with that request. Please try again.