python-oauth2
python-oauth2 copied to clipboard
Twitter Three-legged OAuth Example has a flaw
As currently shown the example will always fail after the pincode is given with a 401 error. The reason is that oAuth v1.0a requires that the oauth_verifier parameter be present in the POST that is making the access token request.
The fix is to add the it as part of the body parameter:
resp, content = client.request(access_token_url, "POST", body="oauth_verifier=%s" % oauth_verifier)
@joestump doc has been updated for this right?
It has not.