1. Go to this page and download the library: Download bnomei/kirby3-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/ */
// default. this will cause loading from the config file or set it here...
$token = null;
$token = 'YOUR-TOKEN-HERE';
$endpoint = 'users/self/media/recent';
$params = [
'count' => 4
];
$force = null; // default. this will cause refresh on global debug == true
// $force = true; // always force refresh
foreach(site()->instagram($token, $endpoint, $params, $force) as $data) {
echo Kirby\Toolkit\Html::img(
$data['images']['standard_resolution']['url']
);
}