It seems that this solution no longer works -
How to get a user's Instagram feed
The new API requires an access token which is dynamically assigned after pas
We can still access the photos. But just last 12 photo. If want more photos access_token require. This my way to get photos.
$instaResult = file_get_contents('https://www.instagram.com/'.$username.'/?__a=1');
$insta = json_decode($instaResult);
$instagram_photos = $insta->graphql->user->edge_owner_to_timeline_media->edges;
Now we get the last photos array.
Than i used in the view with foreach loop.
@foreach($instagram_photos as $instagram_photo)
-
@endforeach