instagram-user-feed
instagram-user-feed copied to clipboard
No followers - getEndCursor() is null
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());