Skip to main content
After this guide, messages sent to your Facebook Page reach your agent and its replies appear in the Messenger thread. You need admin access to the Page. The admin dashboard connects it with Facebook Login and nothing to copy; the CLI takes a Page access token from a Meta app you own. Verified against lua-cli 3.33.0. Before you begin
  • Admin access to a Facebook Page.
  • For the CLI path: a Meta app with the Messenger product, its Page access token, and the Page ID, from Meta’s Messenger Platform documentation.
  • An agent with a promoted production version; see Release an agent.
1

Link the Page

In the admin dashboard open Agents, select the agent, select + in Channels, and choose Facebook. Accept the terms and select Connect. Facebook Login asks for pages_show_list, pages_messaging, pages_read_engagement, pages_manage_metadata, and business_management; grant them and pick the Page. Lua subscribes the Page to the messages and messaging_postbacks webhook fields for you.
2

Provider console: point your app's webhook at Lua

Skip this step on the admin dashboard path. In your Meta app open Messenger → Settings → Webhooks, set the callback URL to https://wa.heylua.ai/fb/webhook, enter the verify token, and subscribe the Page to the messages and messaging_postbacks fields. Meta’s webhooks guide has the current screens.The verify token is Lua’s, not one you choose, and the CLI doesn’t print it.
3

Verify

From a personal Facebook account, message the Page with hello. The agent replies in the thread, and lua channels list shows a FACEBOOK entry with the Page name.

Channel behavior

Note the two names: inbound, Lua.request.channel is facebook; outbound, Channels.send takes messenger.

Limits

  • Proactive sends are warm-only. There is no way to message someone who has never written to the Page.
  • A Page routes to one agent at a time. Linking a Page that is already connected fails; disconnect it in the admin dashboard first.
  • Meta’s Messenger Platform policies apply to every reply the agent sends.

Troubleshooting

The token isn’t valid for that Page ID. Generate the Page access token for the same Page in the Meta app and check the ID in the Page’s settings.
The Page isn’t subscribed to Lua’s webhook. Check the callback URL, the verify token, and that both messages and messaging_postbacks are subscribed for that Page.
A Page token without pages_manage_metadata still sends and receives messages, but Lua can’t inspect its subscription. Reconnect through the admin dashboard to get a token with the full permission set.

Next steps

Connect Instagram

The same Meta account, connected with Instagram Login.

Send proactive messages

What warm-only means for follow-ups.

Channels reference

Channels.send and delivery status.

About channels

The inbound and outbound channel vocabularies.