Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
a6adb649
Commit
a6adb649
authored
Aug 09, 2009
by
Josh Roesslein
Browse files
Some tutorial fixes.
parent
9eba6244
Changes
2
Hide whitespace changes
Inline
Side-by-side
tutorial/t1.py
View file @
a6adb649
...
...
@@ -51,14 +51,14 @@ oauth_auth.get_access_token(verifier)
Okay we are all set then with OAuth. If you want to store the access
token for later use, here's how...
"""
access_token_
to_
store
=
oauth_auth
.
access_token
print
'Access token: %s'
%
access_token_
to_
store
access_token_store
=
oauth_auth
.
access_token
print
'Access token: %s'
%
access_token_store
"""
And to re-create the OAuthHandler with that access token later on...
"""
oauth_auth
=
tweepy
.
OAuthHandler
(
consumer_key
,
consumer_secret
)
oauth_auth
.
access_token
=
access_token_
from_
stor
ag
e
oauth_auth
.
access_token
=
access_token_store
"""
Now let's plugin our newly created auth handler into an API instance
...
...
tutorial/t2.py
View file @
a6adb649
...
...
@@ -48,6 +48,7 @@ Let's query the authenticated user's friends timeline
and print it to the console...
"""
friends_timeline
=
auth_api
.
friends_timeline
()
print
'Friends timeline...'
for
status
in
friends_timeline
:
print
status
.
text
print
'from: %s'
%
status
.
user
.
screen_name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment