问题
I'm trying to get the user's followers, but I receive an empty response. Does anyone know what's wrong?
https://api.instagram.com/v1/users/self/follows?access_token=XXXXXX
{"pagination":{},"meta":{"code":200},"data":[]}
Thank you
回答1:
The reason maybe you are in sandbox mode. Instagram APIs behave differently in Sandbox mode. One of those different behaviors is the screening / visibility of users on Instagram and / or their data set access.
So here's how you add a Sandbox user:
- Go to Instagram Developer and login with your developer account
- Click on Manage clients
- Click on the Edit button for the app you want to add Sandbox users.
- Click on Sandbox tab and enter the username / email id of an Instagram user and press enter
- Click on Save Changes
Regarding the Sandbox concept few things to note:
- You can only add 20 users per app
- Any user can be sandbox user for a maximum of 5 apps.
- You can only pull the recent data belonging to sandbox users in sandbox mode
For more details, check out this answer which explains the concept in a case by case basis or for more details, check out Sandbox Instagram Documentation
Hope it helps!
来源:https://stackoverflow.com/questions/34482578/empty-success-response-with-a-correct-access-token-from-instagram-api