From: Josh Roesslein Date: Fri, 7 Aug 2009 06:15:46 +0000 (-0500) Subject: Example now prompts for login credentials. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c10b5b427f7e2ac7f78076f2d8a23fbacbca43c8;p=tweepy.git Example now prompts for login credentials. --- diff --git a/example.py b/example.py index eabca78..ab3caaf 100644 --- a/example.py +++ b/example.py @@ -1,10 +1,14 @@ +from getpass import getpass + import tweepy print 'An example of using the Tweepy library...' # We need an authentication handler to tell twitter who we are. # First let's make one using basic auth. -basic_auth = tweepy.BasicAuthHandler('username', 'yourpass') +username = raw_input('Username: ') +password = getpass('Password: ') +basic_auth = tweepy.BasicAuthHandler(username, password) # Now a handler for oauth. oauth_auth = tweepy.OAuthHandler('consumer_key', 'consumer_secrete')