RetweetBot listens for certain keywords or hashtags and native retweets what it hears. It uses the Twitter streaming APIs and runs inside an EventMachine reactor. If Twitter is functioning properly, discovering matching tweets is near instant.
You will need to register an application at https://dev.twitter.com/apps to get the required oAuth credentials. These are used to make the retweets. Retweetbot also requires you give it a username and password. This is used to use Twitter's streaming API. Unfortunately, the streaming API does not support oAuth at this time.
Add the necessary ENV variables to your application's environment:
- TWITTER_USERNAME (your twitter username that will be doing the retweeting)
- TWITTER_PASSWORD (password for the above account)
- TWITTER_CONSUMER_KEY (the consumer key for the app you made)
- TWITTER_CONSUMER_SECRET (consumer secret for the above key)
- TWITTER_ACCESS_TOKEN (token generated for your account to your app)
- TWITTER_ACCESS_TOKEN_SECRET (token secret for the above token)
- TWITTER_FILTER (what to look for [hashtags or keywords] ... ex: "#teamDigerati")
- TWITTER_FOLLOW (comma separated list of the user id's to limit the search ... ex: "1,14,140")
You can run either:
ruby retweetbot.rb
Or since we've got a procfile, install foreman (gem install foreman
) and run:
foreman start
heroku create --stack cedar
git push heroku master
heroku scale tweetscan=1
RetweetBot is released under the MIT license.
This project was originally created by Patrick Hogan, forked and tweaked by Jon McCartie, and then uploaded by Team Digerati. Thanks for doing the heavy lifting, Patrick!
In the spirit of free software, everyone is encouraged to help improve this project.
Here are some ways you can contribute:
- by using alpha, beta, and prerelease versions
- by reporting bugs
- by suggesting new features
- by writing or editing documentation
- by writing specifications
- by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
- by refactoring code
- by resolving issues
- by reviewing patches