Igor Nazarov
Igor Nazarov

Reputation: 193

Instagram API multiple requests

I'm developing an app using Instagram API. I need to fetch:

1) the list of users my user follows (https://www.instagram.com/developer/endpoints/relationships/#get_users_follows)

2) the list of users my user is followed by (https://www.instagram.com/developer/endpoints/relationships/#get_users_followed_by).

It is not a problem, but for each user I want to have an info about a number of "follows" and "followed_by". Unfortunately, endpoints I provide above don't return this numbers. So as far as I understood I need to call the next endpoint https://www.instagram.com/developer/endpoints/users/#get_users for each user in the lists. It is too many calls, that is why I need to join these API calls in one call. Is there any way to make something like "batch request"?

I checked Instagram API documentation here https://www.instagram.com/developer/ and the similar question here https://stackoverflow.com/questions/32909284/instagram-api-batch-request. But there are no answers for my question.

Thanks in advance.

Upvotes: 0

Views: 1303

Answers (1)

Hosein Remezan
Hosein Remezan

Reputation: 438

When user is passing OAuth2 protocol, instagram api will return 2 arguments to you the first is 'access_token' and the second is 'user_info' i think in user_info there is a 'count' key, and that is your need.

Upvotes: 0

Related Questions