Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use new Instagram Graph or Basic Display API to fetch profile image of a normal user (as of 29 June 2020)

The former Instagram API (completely removed on 29 June 2020) allowed requesting the avatar URL of a normal user, but the 2 new APIs (Graph and Basic Display) no longer provide this. The Instagram Graph API does provide the profile_picture_url field but ONLY for Business or Creator accounts.

On a production server, if you try to scrape an Instagram page or use the https://www.instagram.com/USERNAME/?__a=1 URL, your requests will eventually start getting redirected to the login page.

How do you grab the profile photo now?

Extra:

I've noticed these four sites managed to grab not only the profile picture, but grab up to 1080x1080 resolution versions, from different official CDN locations too. Perhaps they hold some clues but I haven't been able to find any code that would provide a hint: https://instadp.com https://izuum.com https://gramvio.com https://fullinstadp.com

like image 267
Ron Avatar asked Nov 06 '22 06:11

Ron


1 Answers

i had the same problem. i have start using a valid session id to make any request to instagram server.

now i use https://github.com/postaddictme/instagram-php-scraper to scrape better and manage session better ...

you can find library for you programming language too ...

like image 125
Ali Dahaghin Avatar answered Nov 15 '22 12:11

Ali Dahaghin