twitter-repeater is a bot that automatically retweets any tweets in which its name is "mentioned" in. In order for a tweet to be retweeted, the bot account must be following the original user who tweeted it and the tweet must pass some basic quality tests.
The idea was originally inspired by the @SanMo bot and was created so I could use something similar for New London, CT (@NLCT)
It runs well on Linux but it should run just as well on Mac OSX or Windows.
-
Click the Heroku button:
-
Fill in the fields after creating a new app on the Twitter's Developer page
-
Configure the scheduler to run the repeater every 10 minutes
-
heroku addons:open scheduler
-
Click Add Job and enter:
- Task:
./repeater.py
- Dyno size:
1X
- Frequency:
Every 10 minutes
- Task:
-
Click Save
-
You're all done!
Sorry, but these steps are mostly untested and written from memory. Please send me a pull request if you find a mistake.
-
Check the code out of git:
git clone git@github.com:chooper/twitter-repeater.git
-
Go to Twitter's Developer page and create a new application
-
Configure your repeater app with the Oauth credentials twitter gave you
cp .env.sample .env
and fill in the environment variables
-
Install dependencies (consider a virtualenv):
pip install -r requirements.txt
-
Test that it works:
source .env ; ./repeater.py
-
Add a cronjob to run the bot:
*/10 * * * * /path/to/repeater/repeater.py