Skip to main content

Facebook Messenger Integration

Overview

Nexus receives and sends Facebook Messenger messages via the Meta Graph API. Conversations from Messenger appear in the omnichannel inbox alongside WhatsApp, Instagram, and email.

Capabilities

  • Receive inbound Messenger messages (text, media, attachments).
  • Send outbound text and media messages.
  • Monitor page post comments.
  • Fetch Facebook user profiles for contact enrichment.

Required permissions / scopes

  • pages_messaging
  • pages_manage_metadata
  • pages_read_engagement
  • pages_show_list

Edge Functions

FunctionDirectionPurpose
facebook-webhookInboundReceives Messenger messages and page events
facebook-send-messageOutboundSends Messenger messages
facebook-fetch-profileReadFetches sender profile data
exchange-facebook-tokenAuthExchanges short-lived token for long-lived token
fetch-commentsReadFetches post comments
fetch-postsReadFetches page posts

Webhook setup

Facebook webhooks are configured via the Meta App Dashboard. Subscribe to the messages, messaging_postbacks, and feed topics for the connected Page.

Common troubleshooting

IssueResolution
Webhook not firingVerify subscription in Meta App Dashboard → Webhooks. Check that the Page token is valid.
Token expiredRe-authenticate via Settings → Integrations → Facebook to refresh the long-lived token.
Profile fetch failsCheck that pages_show_list permission is granted.