+ if not os.path.exists(OAUTH_FILENAME):
+ oauth_dance(
+ "the Python Twitter Logger", CONSUMER_KEY, CONSUMER_SECRET,
+ OAUTH_FILENAME)
+
+ oauth_token, oauth_token_secret = read_token_file(OAUTH_FILENAME)
+
+ twitter = Twitter(
+ auth=OAuth(
+ oauth_token, oauth_token_secret, CONSUMER_KEY, CONSUMER_SECRET),
+ domain='api.twitter.com')
+