Andrey Moroz
Andrey Moroz

Reputation: 293

(Instagram API) Get the list of instagram users this user is followed by

I want to get the list of instagram users this user is followed by.(but not for myself, for another user).

I do API call GET

https://api.instagram.com/v1/users/4234233244/followed-by.json?access_token=ACCESS_TOKEN

like this

/v1/users/user_id/followed-by.json?access_token=ACCESS_TOKEN

But I receive following response

{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"you cannot view this resource"}}

Why? How can I do that? I set up follower_list permission scope(Actually all scopes scope=basic+follower_list+public_content+relationships+likes+comments). And He's not a private user, I think so ;). And my dev app is in Sandbox mode, and this user was added to to the Sandbox, so I can get his profile information.

I know

Deprecation of /users/USER-ID/follows and /users/USER-ID/followed-by

But what should I do? I try to develop a great instagram client for tablet :)

Upvotes: 4

Views: 9718

Answers (2)

AmiNadimi
AmiNadimi

Reputation: 5715

List of users who your user follow :

https://api.instagram.com/v1/users/self/follows?access_token=ACCESS-TOKEN

List of users who your user is being followed by :

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

List of recent media from your user :

https://api.instagram.com/v1/users/self/media/recent?access_token=ACCESS-TOKEN

List of recent media from other users :

https://api.instagram.com/v1/users/{user-Id}/media/recent?access_token=ACCESS-TOKEN

More information at Instagram Endpoint Reference

in left pane (below Endpints button) you will see a list of media types, each one corresponding to a page that explains all related api Interfaces.

Upvotes: 0

krisrak
krisrak

Reputation: 12952

I dont think you can get other user's follower list/following list anymore. You can only get the list for the logged in user.

Here is documentation: https://www.instagram.com/developer/endpoints/relationships/

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

you can only get list for self, not any id

Upvotes: 4

Related Questions