Skip to content

Add Facebook Messenger adapter#156

Open
mitkodkn wants to merge 6 commits intovercel:mainfrom
mitkodkn:feat/adapter-facebook
Open

Add Facebook Messenger adapter#156
mitkodkn wants to merge 6 commits intovercel:mainfrom
mitkodkn:feat/adapter-facebook

Conversation

@mitkodkn
Copy link

@mitkodkn mitkodkn commented Mar 2, 2026

Summary

Add @chat-adapter/facebook package for Facebook Messenger Platform integration.

Supports messages (text + attachments), reactions (react/unreact), postbacks, typing indicators, delivery/read confirmations, echo caching, and HMAC-SHA256 webhook signature verification via the Graph API.

Includes FacebookFormatConverter extending BaseFormatConverter for mdast roundtripping, and integration into the example Next.js app with env var auto-detection (FACEBOOK_APP_SECRET, FACEBOOK_PAGE_ACCESS_TOKEN, FACEBOOK_VERIFY_TOKEN).

Test plan

  • pnpm validate passes (knip, lint, typecheck, test, build)
  • pnpm --filter @chat-adapter/facebook test — 44 passed (35 adapter + 9 format converter)
  • End-to-end tested with real Facebook Page credentials via cloudflared tunnel
  • Verified all event types: messages, echoes, reactions, postbacks, deliveries, reads, image attachments

@vercel
Copy link
Contributor

vercel bot commented Mar 2, 2026

@mitkodkn is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

GET handler in webhook route returns static health check instead of forwarding to the Facebook adapter, breaking Facebook Messenger's required GET-based webhook verification flow.

Fix on Vercel

@vercel
Copy link
Contributor

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Mar 2, 2026 9:22pm

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