pgrimaud / instagram-user-feed

This is a scrapper to easily fetch any feed and interact with Instagram (like, follow, etc.) without OAuth for PHP.
MIT License
873 stars 136 forks source link

No followers - getEndCursor() is null #347

Open Nestrot opened 1 year ago

Nestrot commented 1 year ago

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());
babeuloula commented 1 year ago

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.

melnichukme commented 1 year ago

problem solved?

babeuloula commented 1 year ago

@melnichukme No, the problem is still here

This is the graphql response :

image

melnichukme commented 1 year ago

@babeuloula problem with instagram api?

babeuloula commented 1 year ago

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

ElNelyo commented 8 months ago

Hello, got the same issue , followers is empty

esedArk commented 8 months ago

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