Skip to content

Comments endpoint returns empty data[] despite comments_count>0 (Instagram Login token) #64

Description

@juliocsg54

What Happened?

getRecentMediaComments always returns an empty data: [] array for a specific media, even though the media's own comments_count field reports a non-zero count. Confirmed with direct raw fetch calls to the Graph API, bypassing the app's wrapper entirely.

Steps To Reproduce

  1. Connect an Instagram professional account via Instagram Login (provider: META), with a Facebook Page linked to the IG account. App in Development mode, commenting test account added as Instagram Tester with accepted invite.
  2. GET https://graph.instagram.com/v21.0/{media_id}?fields=id,permalink,caption,media_type,comments_count → 200 OK, confirms correct media (permalink matches the real post), media_type: "CAROUSEL_ALBUM", comments_count: 8.
  3. GET https://graph.instagram.com/v21.0/{media_id}/comments?fields=id,text,timestamp,from,replies{from}&order=reverse_chronological&limit=50 → 200 OK, {"data":[],"paging":{"cursors":{"before":"...","after":"..."}}} — empty data despite non-empty cursors.
  4. Same result with order and replies{from} removed from the query, and when querying the carousel's children (two IMAGE items) directly.
  5. Comment was posted after the campaign was created, by an account with an accepted Instagram Tester invite, well within the 72h lookback window, and is still visible on the post when checked manually on instagram.com.

Expected Behavior

The comments endpoint should return the 8 comments the media itself reports having.

Actual Behavior

data: [] every time, regardless of query params, on both the album parent and its children media IDs.

What this rules out

  • Wrong media ID (confirmed correct via permalink)
  • Token decryption / ENCRYPTION_KEY mismatch (confirmed OK)
  • Instagram Tester invite not accepted (confirmed accepted)
  • Instagram's Hidden Words / comment filter (confirmed disabled on the account)
  • Carousel-specific comment location (tried both album parent and children)
  • Missing Facebook Page link (the IG account has a Page linked)

Environment

  • OS: N/A (server-side, Railway container, Node/tsx)
  • Node version: (whatever node -e "console.log(process.version)" returns, can add if needed)
  • Database: Postgres (Neon)
  • Account: Instagram professional account, Instagram Login, Facebook Page linked, app in Development mode

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