PHP code example of danieltrolezi / instagram-sdk

1. Go to this page and download the library: Download danieltrolezi/instagram-sdk 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/ */

    

danieltrolezi / instagram-sdk example snippets


$instagram = new Instagram('CLIENT ID', 'CLIENTE SECRET');

$instagram->setRedirectUri('REDIRECT URI');
header('location: ' . $instagram->getLoginURL());

$access_token = $instagram->getAccessToken($_GET['code']);

 $user = $instagram->call('users/self');