Skip to content

Facebook, three read tools on the user token - #21

Merged
fajarhide merged 1 commit into
mainfrom
feat/facebook
Aug 17, 2026
Merged

Facebook, three read tools on the user token#21
fajarhide merged 1 commit into
mainfrom
feat/facebook

Conversation

@fajarhide

Copy link
Copy Markdown
Owner

Adds the personal half of Meta: get_me, list_my_posts, list_liked_pages, as a manifest.

All three read through /me, so the single user token a grant already stores is the only credential involved. That is the whole reason this half is buildable now. Pages and Instagram are a separate use case in Meta's console (confirmed 2026-08-17), and each Page there carries its own token that the executor cannot swap per call. They stay out until that capability is designed.

Two decisions worth naming.

No version in any path. Meta applies the app's own default when the path carries none. Pinning a version from memory risks naming one already retired, which would fail every call for a reason the error does not explain. A test asserts no /vNN.N/ appears in the manifest, so pinning it later is a deliberate act.

No longLivedRefresh. The code exchange is traded once for a sixty day token through fb_exchange_token, the same shape Threads uses. Facebook has no th_refresh_token equivalent for a user token, so a grant dies at sixty days and reconnecting is the only path. Its absence is the accurate model, not an omission.

Paging reuses the Meta cursor shape Threads already proved, including the trap where the cursor survives on the last page and only paging.next says whether more exists.

$ npx vitest run
Test Files  36 passed (36)
     Tests  366 passed (366)

Maturity is experimental, and that is the honest label: no request in this file has reached Meta. The fixtures are written from the documentation, which catches a wrong shape and cannot catch a wrong document. Promotion to beta needs a real connection, which needs a tunnel and FACEBOOK_CLIENT_ID, and stays a human act.

Closes #20

Every tool reads through /me, so the one user token a grant already stores is
the only credential involved. That is what makes this half of Meta buildable
today: Pages and Instagram are a separate use case in the console, and each
Page there carries its own token the executor cannot swap per call.

Paths carry no version so Meta applies the app's own default. Pinning one from
memory would fail every call once that version is retired, for a reason nothing
in the error explains.

The token trade is Threads' minus the refresh. Facebook has no th_refresh_token
equivalent for a user token, so a grant dies at sixty days and reconnecting is
the only path. longLivedRefresh is absent on purpose.

Ships experimental. No request in this file has reached Meta.

Closes #20
@fajarhide
fajarhide merged commit 91221ad into main Aug 17, 2026
2 checks passed
@fajarhide
fajarhide deleted the feat/facebook branch August 17, 2026 05:15
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.

Facebook, three read tools on the user token

1 participant