PYTHON   43

tweet py

Guest on 25th August 2022 04:47:05 AM

  1. #!/usr/bin/env python
  2. from twython import Twython
  3.  
  4.  
  5.  
  6. # your twitter consumer and access information goes here
  7. # note: these are garbage strings and won't work
  8. apiKey = '3jUZacO80oKslHnzj95QwuXBR' # put your API Key here
  9. apiSecret = 'DgtLS5AkuslR84CQBBjdPC84HGXg2RAnRVk8SdTTuJDYtgACSQ' # put API Secret here
  10. accessToken = '2901114905-OLi8mzAw83YTSveYub8FjcaObsebLlvm2fqBw0f' # access token here
  11. accessTokenSecret = 'SsHDfk9eptb8jStUQH6Sto7OnDWs9xzdbe3YhVzKkmuWY' #access token secret
  12.  
  13. api = Twython(apiKey,apiSecret,accessToken,accessTokenSecret)
  14.  
  15. tweetStr = "My 3rd tweet!"
  16.  
  17. api.update_status(status=tweetStr)
  18.  
  19. print "Tweeted: " + tweetStr

Raw Paste


Login or Register to edit or fork this paste. It's free.