Hao Hoang
Hao Hoang

Reputation: 51

Filter media of followers list using private Instagram API in PHP

I'm using the Instagram private API to get the followers list of any user, and I want to filter users who have 10 or more media.

The result is an array of users with 10 or more media. However, I received a response

InstagramAPI\Response\FriendshipsShowManyResponse: Invalid user list.

I think my problem is in the following snippet. How can I fix this?

  $user_ids = [];
  foreach ($users as $i => $user) {
      if($user->getMediaCount()>10) {
           $user_ids[] = $user->getPk();
      }
  }

Upvotes: 0

Views: 599

Answers (1)

David J
David J

Reputation: 1098

This is deprecated by Instagram. See: https://www.instagram.com/developer/

Upvotes: 1

Related Questions