Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2015
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. import tweepy, time, sys
  5.  
  6. argfile = str(sys.argv[1])
  7.  
  8. #enter the corresponding information from your Twitter application:
  9. CONSUMER_KEY = ''#keep the quotes, replace this with your consumer key
  10. CONSUMER_SECRET = ''#keep the quotes, replace this with your consumer secret key
  11. ACCESS_KEY = '2992120279-'#keep the quotes, replace this with your access token
  12. ACCESS_SECRET = ''#keep the quotes, replace this with your access token secret
  13. auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
  14. auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
  15. api = tweepy.API(auth)
  16.  
  17. filename=open(argfile,'r')
  18. f=filename.readlines()
  19. filename.close()
  20.  
  21. for line in f:
  22.     api.update_status(line)
  23.     time.sleep(1800)#Tweet every 30 minutes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement