jusdepixel / instagram-api-laravel
Get your instagram feeds and share them !
v1.2.4
2023-03-23 10:52 UTC
Requires
- php: ^8.1
- illuminate/support: ^10.1
Requires (Dev)
- guzzlehttp/guzzle: ^7.5
- orchestra/testbench: ^8.0
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2024-10-23 14:19:20 UTC
README
Get multiple instagram feeds and share them in one
Configuration
Setting your Instagram application in .env
INSTAGRAM_ROUTES_PREFIX=api
INSTAGRAM_CLIENT_ID=INSTAGRAM_CLIENT_ID
INSTAGRAM_CLIENT_SECRET=INSTAGRAM_CLIENT_SECRET
INSTAGRAM_REQUEST_URI=https://mydomain.me/INSTAGRAM_ROUTES_PREFIX/auth/code
Installation
Install this package via Composer
composer require jusdepixel/instagram-api-laravel
Add service in config/app.php
Jusdepixel\InstagramApiLaravel\InstagramServiceProvider::class,
Add jobs in app/Console/Kernel.php
protected function schedule(Schedule $schedule): void
{
$schedule->job(new RefreshTokenJob)->daily();
$schedule->job(new RefreshMediaJob)->daily();
$schedule->job(new AutoRepostJob)->daily();
}
Run migration
php artisan migrate
And start server
php artisan serve
Usage
Get your instagram app code first
GET /api/init/url
Copy returned code
{"code":"INSTAGRAM_CODE"}
Then, get your token
POST /api/auth/login/INSTAGRAM_CODE
You are now logged, you could use routes !
Routes
See instagram-api-laravel.postman_collection.json
Link
Github instagram-api-laravel
Packagist instagram-api-laravel