instagram-user-feed icon indicating copy to clipboard operation
instagram-user-feed copied to clipboard

No followers - getEndCursor() is null

Open Nestrot opened this issue 1 year ago • 7 comments

Version(s) affected: 6.16.4

Description
Followers are no longer output because the endcursor is null:

object(Instagram\Model\FollowerFeed)#7 (4) { ["count":"Instagram\Model\FollowerFeed":private]=> int(957) ["hasNextPage":"Instagram\Model\FollowerFeed":private]=> bool(false) ["endCursor":"Instagram\Model\FollowerFeed":private]=> NULL ["users":"Instagram\Model\FollowerFeed":private]=> array(0) { } }

Fatal error: Uncaught TypeError: Argument 2 passed to Instagram\Api::getMoreFollowers() must be of the type string, null given

How to reproduce

  $followersFeed = $this->api->getFollowers(self::IG_USER_ID);
 
  var_dump($followersFeed);
  
  do {
    $followersFeed = $this->api->getMoreFollowers(self::IG_USER_ID, $followersFeed->getEndCursor());
    sleep(2);
  } while ($followersFeed->hasNextPage());

Nestrot avatar Nov 18 '22 08:11 Nestrot