diff --git a/setup.py b/setup.py index 9113ce2..7c155ab 100755 --- a/setup.py +++ b/setup.py @@ -65,13 +65,21 @@ db.closeConnection() config.add_section("Twitter") -cke = "V6ekVFYtavi6IvRFLS0dHifSh" -cse = "U2duSfBtW0Z8UQFoJyARf3jU80gdQ44EEqWqC82ebuGbIPN3t7" +print('''We are going to need a consumer key and consumer secret for accessing Twitter. +If you don't have this yet, go to apps.twitter.com and create a new application. This +application will need read/write access as well as access to direct messages.''') + +cke = input("Consumer key: ") +cse = input("Consumer secret: ") config.set("Twitter", "cke", cke) config.set("Twitter", "cse", cse) auth = tweepy.OAuthHandler(cke, cse) +try: + auth = tweepy.OAuthHandler(cke, cse) +except tweepy.TweepError: + print("Failed to authenticate with Twitter. Please check your consumer key and secret.") try: authurl = auth.get_authorization_url()