Create Twitter bots with this framework
PHP HTML Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
lib
playground
sql
.gitignore
README.md
oauth.php
run.php
run_bot
run_cron.php
run_cron_bot

README.md

WooBenders

WooBendersLogo

A framework to ease the creation of Twitter bots.

Installation

git clone https://github.com/ojoven/woobenders.git
  • Create the bot account on Twitter

https://twitter.com/signup

  • Create an app on Twitter

https://apps.twitter.com/app/new

(Remember to give it write permissions)

Customize

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

app/bots/settings/Settings.php.default

to

Settings[YourBotsClassName].php

and set there the Twitter keys and tokens, apart from the DB credentials in case you want to make use of a DB.

Oauth

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

http://[pathToYourApp]/oauth.php

to give access to the profile that will be the bot, and copy paste the token credentials on your Settings file.

Run

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 &

Credits

We're using the following libraries:

This framework has been done by @ojoven. You can find me, too, at http://ojoven.es

Example

Along with this framework, it comes a working example of use. Just say hi! (in spanish), to @donpepitobot:

Hola, @donpepitobot

Disclaimer

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.

Cheers!