1. Go to this page and download the library: Download cosenary/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/ */
cosenary / instagram example snippets
use MetzWeb\Instagram\Instagram;
$instagram = new Instagram(array(
'apiKey' => 'YOUR_APP_KEY',
'apiSecret' => 'YOUR_APP_SECRET',
'apiCallback' => 'YOUR_APP_CALLBACK'
));
echo "<a href='{$instagram->getLoginUrl()}'>Login with Instagram</a>";
// set user access token
$instagram->setAccessToken($data);
// get all user likes
$likes = $instagram->getUserLikes();
// take a look at the API response
echo '<pre>';
print_r($likes);
echo '<pre>';