Looking to hire Laravel developers? Try LaraJobs

instagram-api-laravel maintained by jusdepixel

Description
Get your instagram feeds and share them !
Author
Last update
2023/03/23 11:52 (dev-main)
License
Links
Downloads
36
Tags

Comments
comments powered by Disqus

Instagram Api Laravel

Get multiple instagram feeds and share them in one


Laravel support v9, v10 Tests passing Licence MIT

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