I am looking all over the web and can't believe I can't find an answer to my question. I would like to display the latest single instagram photo on my website. simple as that.
No gallery, no fancybox, no slideshow etc etc
I found this useful link: http://www.blueprintinteractive.com/blog/how-instagram-api-fancybox-simplified
it's actually working but it doesn't give an option of how many images you would like to display and I would like only one latest instagram image.
anyone have an idea?
Thanks
You can break
foreach
after showing first image like below:
foreach ($result->data as $post) {
// Do something with this data.
break; // for one result only
}
Or add &count=1
at end of url
as below
https://api.instagram.com/v1/users/ID-GOES-HERE/media/recent/?access_token=TOKEN-GOES-HERE&count=1
The answer is right here: http://instagram.com/developer/endpoints/users/#get_users_media_recent_with_client_id
Count option for number of media !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With