Facebook Messenger Integration Guide
Connect your AI Agent to a Facebook Page and automate conversations on Messenger. Authentication is handled via a Meta OAuth login flow — no manual token entry required. Once connected, all Messenger conversations from your selected Page are routed to your AI Agent automatically.
Prerequisites
Before you begin, make sure:
- You have a Facebook account with admin access to the Page you want to connect.
- The Facebook Page already exists. Create one at facebook.com/pages/create if needed.
1. Open the Facebook Messenger setup
- In the Kaily dashboard, navigate to Deploy.
- Find the Facebook Messenger card and click Setup.
The setup panel shows a Facebook Credentials section on the left and a summary of how the connection works on the right.
2. Log in with Facebook
- Click Connect Facebook Page.
- A Meta login popup opens. Sign in with the Facebook account that manages the Page you want to connect.
- When prompted, approve the requested permissions:
pages_messaging— allows the AI Agent to send and receive Messenger messages on your Page.pages_manage_metadata— allows Kaily to subscribe to Messenger events for your Page.
Sign in with the Facebook account that has admin access to the target Page, not just any Facebook account.
3. Select your Facebook Page
After approving permissions, Kaily fetches all Pages your account manages and displays them.
- Review the list of Pages.
- Click Connect next to the Page you want to link to this AI Agent.
If your Page does not appear, confirm that the logged-in account has admin rights to it.
If the selected Page is already connected to a different AI Agent, a confirmation dialog will appear. Click Proceed to reassign the Page to this agent. This disconnects the previous agent.
4. Verify the connection
Once a Page is connected, the Facebook Credentials section shows:
- Facebook Page Name — the name of the connected Page (read-only, with a copy button).
All new Messenger conversations sent to this Page are now routed to your AI Agent.
5. Configure Auto Suggestions (optional)
After connecting, you can enable Auto Suggestions:
- Toggle Auto Suggestions on to have your AI Agent automatically suggest quick follow-up replies after each response.
- Toggle it off to disable this behavior.
Changes take effect immediately.
6. Disconnect or switch Pages
To connect a different Page or remove the integration:
- Click Reset Credentials in the top-right of the Facebook Credentials section.
- The Page is immediately disconnected.
- You can then log in again and select a different Page.
Resetting credentials disconnects Messenger for the current Page. Users will not receive AI Agent responses until you reconnect.
Troubleshooting
| Symptom | Fix |
|---|---|
| No Pages appear after login | Confirm the Facebook account has admin access to a Page. |
| Popup is blocked | Allow popups for the Kaily dashboard domain in your browser settings. |
| Permission error during login | Re-attempt login and approve all requested permissions when prompted. |
| Messenger messages not received | Check that the Page subscription is active; reset credentials and reconnect if needed. |