From 2225a59153c68eae938a2248921864d4765d1eff Mon Sep 17 00:00:00 2001 From: Josh Roesslein Date: Sat, 8 Aug 2009 14:52:26 -0500 Subject: [PATCH] Update tutorials. --- tutorial/t0.py | 9 ++++++++- tutorial/t1.py | 7 ++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tutorial/t0.py b/tutorial/t0.py index 3735d1c..363ac11 100644 --- a/tutorial/t0.py +++ b/tutorial/t0.py @@ -8,7 +8,14 @@ If you get lost on your journey to becoming a Tweepy guru, feel free to post questions to tweepy@googlegroups.com Each tutorial file is named tX.py where X is the tutorial number. -Work your way from 1 and up. +Work your way from 1 and up. These files should be runnable by python. +Be sure the tweepy library is on your python path by either installing +it on your system OR setting the PYTHONPATH environment variable. +You can then run the tutorial like such: + + python t1.py + Author: Joshua Roesslein """ + diff --git a/tutorial/t1.py b/tutorial/t1.py index c161d76..d526829 100644 --- a/tutorial/t1.py +++ b/tutorial/t1.py @@ -24,10 +24,10 @@ You must supply the handler both your consumer key and secret which twitter supplies you with at http://twitter.com/oauth_clients You may also supply a callback URL as an optional parameter. """ -consumer_key = '' -consumer_secret = '' +consumer_key = 'ZbzSsdQj7t68VYlqIFvdcA' +consumer_secret = '4yDWgrBiRs2WIx3bfvF9UWCRmtQ2YKpKJKBahtZcU' oauth_auth = tweepy.OAuthHandler(consumer_key, consumer_secret) -oauth_auth_callback = tweepy.OAuthHandler(consumer_key, consumer_secret +oauth_auth_callback = tweepy.OAuthHandler(consumer_key, consumer_secret, 'http://test.com/my/callback/url') """ @@ -52,6 +52,7 @@ 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 """ And to re-create the OAuthHandler with that access token later on... -- 2.25.1