A framework to ease the creation of Twitter bots.
git clone https://github.com/ojoven/woobenders.git
- Create the bot account on Twitter
- Create an app on Twitter
(Remember to give it write permissions)
You have to create your own bot as a PHP class on app/bots. Please check DonPepitoBot and PlagiasTwits as examples on what can be done.
For the bot to work you must create the settings configuration file by renaming
and set there the Twitter keys and tokens, apart from the DB credentials in case you want to make use of a DB.
If the bot's Twitter profile is the one from which you create the Twitter app on https://apps.twitter.com/app/new you can get the OAuth Tokens directly in the App's settings page. If not, you'll need to call
to give access to the profile that will be the bot, and copy paste the token credentials on your Settings file.
To run, just execute ./run_bot [YourBotsName] (with nohup if you want it to have it running after closing bash)
nohup ./run_bot [YourBotsName] > nohup.out 2>&1 &
We're using the following libraries:
Along with this framework, it comes a working example of use. Just say hi! (in spanish), to @donpepitobot:
This is not intended to be an standard framework for creating Twitter bots, but its intent is just to ease their creation.
Please use at your own risk and feel free to customize it to your specific needs.