Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amieiro/laravel-twitter-bot
A Laravel Twitter bot proof of concept
https://github.com/amieiro/laravel-twitter-bot
bot bots laravel laravel-twitter-bot laravel5 laravel5-5 laravel55 twitter twitter-bot
Last synced: 21 days ago
JSON representation
A Laravel Twitter bot proof of concept
- Host: GitHub
- URL: https://github.com/amieiro/laravel-twitter-bot
- Owner: amieiro
- License: gpl-3.0
- Archived: true
- Created: 2017-11-01T00:22:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T22:46:28.000Z (over 5 years ago)
- Last Synced: 2024-09-27T19:20:57.673Z (5 months ago)
- Topics: bot, bots, laravel, laravel-twitter-bot, laravel5, laravel5-5, laravel55, twitter, twitter-bot
- Language: PHP
- Size: 185 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
## Laravel Twitter Bot
This app sends random tweets (selected from a database) periodically (each hour) and automatically, through the Laravel task scheduling. This project doesn't have a graphical user interface.
You can read how I developed this app in my blog: [Creating a Laravel Twitter bot](https://www.jesusamieiro.com/creating-a-laravel-twitter-bot/)
## Requirements
You need shell access to a server with the [server requirements for a Laravel 5.5 application](https://laravel.com/docs/5.5/installation#server-requirements):
- PHP >= 7.0.0
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP ExtensionYou need to create a Twitter app and the four keys from the app:
- Consumer Key (API Key)
- Consumer Secret (API Secret)
- Access Token
- Access Token Secret## Install the bot
- Clone the project.
```shell
git clone https://github.com/amieiro/laravel-twitter-bot.git
```
- Run composer```shell
composer install
```
- Modify the seeder if you need to change it: edit the database/seeds/TweetsTableSeeder.php file.- Create the database
```shell
touch database/laravel-twitter-bot.sqlite
```- Migrate the database with the seeder
```shell
php artisan migrate:refresh --seed
```- Create the .env file
```shell
cp .env.example .env
```- Add the 4 keys from the Twitter app in the .env file.
- Add the scheduler in the cron
```shell
* * * * * php /home/vagrant/Code/web/laravel-twitter-bot/artisan schedule:run >> /dev/null 2>&1
```## License
The Laravel Twitter Bot is open-sourced software licensed under the [GNU GPL v3](https://opensource.org/licenses/GPL-3.0).