PHP code example of delta98 / instaphp
1. Go to this page and download the library: Download delta98/instaphp 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/ */
delta98 / instaphp example snippets
php
$api = new Instaphp\Instaphp([
'client_id' => 'your client id',
'client_secret' => 'your client secret',
'redirect_uri' => 'http://somehost.foo/callback.php',
'scope' => 'comments+likes'
]);
$popular = $api->Media->Popular(['count' => 10]);
if (empty($popular->error)) {
foreach ($popular->data as $item) {
printf('<img src="%s">', $item['images']['low_resolution']['url']);
}
}