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 2 years 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

Hello,

Happy new year to all of you.

I've the same issue. When I inspect requests from Instagram website, the request is :

https://www.instagram.com/api/v1/friendships/XXXX/followers/?count=12&search_surface=follow_list_page

Maybe this can help.

babeuloula avatar Jan 01 '23 09:01 babeuloula

problem solved?

melnichukme avatar Jan 06 '23 22:01 melnichukme

@melnichukme No, the problem is still here

This is the graphql response :

image

babeuloula avatar Jan 07 '23 14:01 babeuloula

@babeuloula problem with instagram api?

melnichukme avatar Jan 10 '23 14:01 melnichukme

Yes with this call : https://github.com/pgrimaud/instagram-user-feed/blob/03762f186804ce5d20cfc0649e5c99b693225e4f/src/Instagram/Transport/JsonFollowerDataFeed.php#L28

babeuloula avatar Jan 10 '23 19:01 babeuloula

Hello, got the same issue , followers is empty

ElNelyo avatar Jan 07 '24 20:01 ElNelyo

It happens to me with getMedias(), it returns an empty array.

esedArk avatar Jan 19 '24 22:01 esedArk