Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tweepy, time, sys
- argfile = str(sys.argv[1])
- #enter the corresponding information from your Twitter application:
- CONSUMER_KEY = 'AOqwUv5bH51mJrtrz1vmqWixg'#keep the quotes, replace this with your consumer key
- CONSUMER_SECRET = 'pqmbh9bSwk5Xv5oJd9ab7mg0bwHoG1YOAsLq6mJAKV490m8XlF'#keep the quotes, replace this with your consumer secret key
- ACCESS_KEY = '3194805406-xiHl3OxyBmS7oGy8m02p3DFljxqaZ80BDKZ3Wdo'#keep the quotes, replace this with your access token
- ACCESS_SECRET = 'cQK3EqeZMBLpSIOQiobi6ggbpGVQjNV5JwezSZSIiRGWP'#keep the quotes, replace this with your access token secret
- auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
- auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
- api = tweepy.API(auth)
- filename=open(argfile,'r')
- f=filename.readlines()
- filename.close()
- for line in f:
- api.update_status(status = line)
- time.sleep(60)#Tweet every 1 minutes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement