Follower/following lists come back empty (query_hash GraphQL returns no edges) · Issue #331 · mifi/SimpleInstaBot · GitHub
Skip to content

Follower/following lists come back empty (query_hash GraphQL returns no edges) #331

Open

Description

@prymal-digital

Follower/following lists come back empty (query_hash GraphQL returns no edges)

Version: 1.11.16 (macOS, arm64)

What happens

Since 1.11.16 the profile lookup works again (thanks for the GraphQL fix!), but the bot then finds nobody to follow. The follower list request for a target account returns the follower count, but an empty list and has_next_page: false:

{"data":{"user":{"edge_followed_by":{"count":6269,"page_info":{"has_next_page":false,"end_cursor":null},"edges":[]}}},"extensions":{"is_final":true},"status":"ok"}

So followUserFollowers finishes the target immediately without following anyone. No error is logged, so it looks like the bot is working.

Cause

getFollowersOrFollowingGenerator still uses the old graphql/query/?query_hash=... queries:

  • followers: 37479f2b8209594dde7facb0d904896a
  • following: 58712303d941c6855d4e888c5f0cd22f

Instagram now answers both with "edges": []. The following query is used by unfollowNonMutualFollowers, unfollowAllUnknown, unfollowOldFollowed and listManuallyFollowedUsers, so those likely see an empty list too.

Possible fix

The Followers/Following dialog on instagram.com loads its lists from /api/v1/friendships/<userId>/followers/?count=12&search_surface=follow_list_page (and /following/?count=12), paginated with next_max_id → max_id. doesUserFollowMe already relies on that endpoint. Fetching it from the page with the x-ig-app-id header works in a local patch, but you probably know best what page size and pacing are safe here.

Possibly related

Our account got a "confirm you're human" checkpoint after a run that paged through a large following list via that endpoint (12 per page, a few seconds between pages, during unfollowOldFollowed). It may be unrelated, but it seems worth knowing before choosing page size and pacing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions