This commit is contained in:
Klaus-Uwe Mitterer 2017-02-28 11:14:45 +01:00
parent 8c00ece7bd
commit b06fe841ae

View file

@ -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()