Commit ac5eb801 authored by Aaron1011's avatar Aaron1011
Browse files

Merge pull request #526 from skoczen/master

Fixes to docs - auth tutorial docs were busted!
parents 6b5482ee a1bccb80
...@@ -33,3 +33,4 @@ Jeff Hull (@jsh2134) ...@@ -33,3 +33,4 @@ Jeff Hull (@jsh2134)
Mike (mikeandmore) Mike (mikeandmore)
Kohei YOSHIDA Kohei YOSHIDA
Mark Smith (@judy2k) Mark Smith (@judy2k)
Steven Skoczen (@skoczen)
\ No newline at end of file
...@@ -65,8 +65,7 @@ request token in the session since we will need it inside the callback ...@@ -65,8 +65,7 @@ request token in the session since we will need it inside the callback
URL request. Here is a pseudo example of storing the request token in URL request. Here is a pseudo example of storing the request token in
a session:: a session::
session.set('request_token', (auth.request_token.key, session.set('request_token', auth.request_token)
auth.request_token.secret))
So now we can redirect the user to the URL returned to us earlier from So now we can redirect the user to the URL returned to us earlier from
the get_authorization_url() method. the get_authorization_url() method.
...@@ -94,7 +93,7 @@ treasure box. To fetch this token we do the following:: ...@@ -94,7 +93,7 @@ treasure box. To fetch this token we do the following::
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
token = session.get('request_token') token = session.get('request_token')
session.delete('request_token') session.delete('request_token')
auth.set_request_token(token[0], token[1]) auth.request_token = token
try: try:
auth.get_access_token(verifier) auth.get_access_token(verifier)
...@@ -108,8 +107,8 @@ revokes our application access. To store the access token depends on ...@@ -108,8 +107,8 @@ revokes our application access. To store the access token depends on
your application. Basically you need to store 2 string values: key and your application. Basically you need to store 2 string values: key and
secret:: secret::
auth.access_token.key auth.access_token
auth.access_token.secret auth.access_token_secret
You can throw these into a database, file, or where ever you store You can throw these into a database, file, or where ever you store
your data. To re-build an OAuthHandler from this stored access token your data. To re-build an OAuthHandler from this stored access token
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment