Skip to content

feat(instagram-style): media comments + long-lived token refresh - #58

Merged
deblasis merged 1 commit into
mainfrom
feat/instagram-comments-refresh
Aug 17, 2026
Merged

feat(instagram-style): media comments + long-lived token refresh#58
deblasis merged 1 commit into
mainfrom
feat/instagram-comments-refresh

Conversation

@deblasis

Copy link
Copy Markdown
Contributor

Closes the Graph-surface gaps a real client integration needs beyond publish/insights:

  • GET /v21.0/{media_id}/comments — authorizes via the access_token query param (how SDK clients actually call this endpoint family) or the bearer header; two deterministic per-media comments (id/text/username/timestamp/like_count), Graph since filter, 404 on unknown media, 401 code 190 on unknown tokens.
  • GET /v21.0/refresh_access_tokengrant_type=ig_refresh_token mints a fresh 60-day token for the same user; the old token keeps working until its own expiry (real semantics). Literal route ordered before /v21.0/{container_id}.
  • RFC3339→unix civil-days parser in Starlark (media timestamps are Graph-format strings; no engine time-parse builtin).

Gates: full suite, adapter lint (94), gofmt, vet — green; instagram lifecycle test extended with comment determinism, since-filter, refresh flow + negatives.

GET /v21.0/{media_id}/comments — the Graph comment-reader surface:
authorizes via the access_token query param (how real SDK clients
call it) or bearer, synthesizes two deterministic per-media comments
(id/text/username/timestamp/like_count), honors the Graph since
filter, 404s unknown media.

GET /v21.0/refresh_access_token — long-lived token refresh
(grant_type=ig_refresh_token): validates the presented token, mints a
fresh 60-day token for the same user, old token stays valid until its
own expiry. Literal route precedes /v21.0/{container_id}.

Prepares the adapter for real client integrations whose comment-ingest
and token-refresh paths need somewhere faithful to run.
@deblasis
deblasis merged commit 3946b71 into main Aug 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant