Instagram API not returning followers

2019-05-02 18:06发布

问题:

I'm authenticated with Instagram, and I got an access token with scope follower_list. Then I tried to get my followers list:

https://api.instagram.com/v1/users/self/followed-by?access_token=123.456

and all I got was an empty array, like following

{
    "pagination": {},
    "meta": {
        "code": 200
    },
    "data": []
}

I don't really know if this is a problem from Instagram side or this is an expected behavior since I'm on Sandbox mode (although the documentation says I can expect to get real data even on Sandbox mode)

回答1:

This is expected behavior.

In sandbox mode you will only get data from you and your sandbox users.

Add one of your followers to your sandbox, then only that user will be in API response. Once you go live, all users will be in API response.