arslan2037's avatar

How to select images from instagram

I have only a field in which user enter its instagram username, when user hit enter it will see box with images to select an image to upload it on its profile. How i can achieve this? i see few methods using api, but i am not sure how i can give user access to select image from that list

0 likes
1 reply
tompec's avatar
tompec
Best Answer
Level 9

You can use this endpoint to get the last 20 user's images.

$username = "your-username";

$endpoint = "https://www.instagram.com/$username/media/";

It will return a JSON response that you can parse and display on your page.

2 likes

Please or to participate in this conversation.