https://github.com/phosphore/twitter-bot
A skeleton to create a bot that replies when you mention it, easily customizable!
https://github.com/phosphore/twitter-bot
Last synced: about 2 months ago
JSON representation
A skeleton to create a bot that replies when you mention it, easily customizable!
- Host: GitHub
- URL: https://github.com/phosphore/twitter-bot
- Owner: phosphore
- Created: 2014-12-24T13:20:14.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-31T08:43:10.000Z (over 11 years ago)
- Last Synced: 2025-01-10T07:47:59.458Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 887 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
twitter-bot
===========
A skeleton to create a bot that replies when you mention it, easily customizable :package:
:wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash:
## Installation
1. Make sure you have [Composer](http://getcomposer.org)
2. Clone the twitter-bot repository into the workbench and install dependencies
```
git clone https://github.com/phosphore/twitter-bot.git workbench/twitter-bot
cd workbench/twitter-bot
composer install
```
3. Register an [application](http://apps.twitter.com) and change the consumerKey, consumerSecret, accessToken and accessTokenSecret from 'events/bot.json'
4. Customize the replies
5. Open bot.php and change the path for your json configuration file
6. Set up a cron job to execute bot.php
You may also want to play with the code in bot.php. I tried to comment it as much as possible for your understanding, but you may need to read the [Twitter API's doc](https://dev.twitter.com/rest/public) to have an idea of what kind of objects are returned.
## Demo
[Squarify bot](https://twitter.com/squarifybot) uses this piece of software. You can tweet an image mentioning *@squarifybot* and it will reply with the modified picture.
:wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash::wavy_dash:
:space_invader: Use it responsibly :space_invader: