PHP code example of dotenv / instagram

1. Go to this page and download the library: Download dotenv/instagram library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dotenv / instagram example snippets


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);
});