问题
I can see my media using
https://api.instagram.com/v1/users/self/media/recent/?access_token=**MY_ACCESS-TOKEN**
I want to get user's media, so I use this
https://api.instagram.com/v1/users/**ID_USER**/media/recent/?access_token=**MY_ACCESS_TOKEN**
I get an error, because his account is private
{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"you cannot view this resource"}}
But I follow him, so I should see his media. What should I do ?
回答1:
the following link works for me without any authentication
https://www.instagram.com/{username}/media/
回答2:
Before getting the access token, did u include the scope in getting the access code like the call of api below?
https://api.instagram.com/oauth/authorize/?client_id=[]&redirect_uri=[]&response_type=code&scope=public_content
You must set the scope of permission to public content in order to access other user's media.
来源:https://stackoverflow.com/questions/34827137/how-to-get-users-media-through-instagram-api