A simple inspired by socialite library for laravel to authenticate users and obtain data from instagram api.
The package installation can be done with composer by the following command:
composer require dotenv/instagram
Dotenv\Instagram\Providers\InstagramServiceProvider::class,
'Instagram' => Dotenv\Instagram\Facades\Instagram::class,
'Instagram' => Dotenv\Instagram\Facades\Instagram::class,
php artisan vendor:publish --provider="dotenv\instagram"
Route::get('auth/', function() {
return \Instagram::authenticate();
});
Route::get('auth/callback', function() {
$user = \Instagram::retrieveUser();
$userFromToken = \Instagram::userFromToken($user->token);
});
Instagram library is licensed under [The MIT License (MIT)] (https://github.com/dotenv/instagram/blob/master/LICENSE)(LICENSE).