I am trying to get some details ( username, description, Posts Count, total likes & total comments ) from Instagram user
First i get the code from api.instagram.com with scope user_profile and user_media https://api.instagram.com/oauth/authorize?client_id={appId}&redirect_uri={redirectUri}&scope=user_profile,user_media&response_type=code
After the user accepts the permission and allows the sharing of information it I got the code in my redirectUri.
then using that code and developer auth details I get the access_token by
https://api.instagram.com/oauth/access_token endpoint with fields client_id, redirect_uri, grant_type = authorization_code, client_secret and the code. in response, I got the user_id and the access_token.
Then I try to get the username and user details by calling the below endpoint Refrence
https://graph.instagram.com/me?fields=id,username&access_token={access_token}. in response, I got the username and id.
Now I am not sure how to get the details like ( username, description, Posts Count, total likes & total comments ).
What I have tried
- I try to get the details by calling the https://www.instagram.com/someone/?__a=1 it works fine sometimes but now it's not returning anything.
- Instagram Graph Api in this I am getting the error the access token is not valid. ( not sure which access token to user Instagrams or facebooks )