Created
November 20, 2012 00:04
-
-
Save RichardLitt/4115026 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import tweepy | |
CONSUMER_KEY = "..." | |
CONSUMER_SECRET ="..." | |
ACCESS_KEY = "..." | |
ACCESS_SECRET = "..." | |
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) | |
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET) | |
api = tweepy.API(auth) | |
if len(sys.argv[1]) >= 140: | |
print 'String too long by %s characters' % str(len(sys.argv[1])-140) | |
tweet = raw_input('Try again: ') | |
else: | |
tweet = sys.argv[1] | |
api.update_status(tweet) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment