Skip to main content

Overview

Facebook Messenger integration allows your agent to respond to messages sent to your Facebook Business Page.

2.9B Users

Massive Facebook user base

Page Integration

Connect to business page

Rich Media

Images, videos, buttons

Social Context

See user’s public profile

Prerequisites

Meta updates Facebook and its developer tools frequently. The steps below describe what you need; for exact, up-to-date screens, see Meta’s Messenger Platform documentation.
1

Facebook Business Page

You need admin access to a Facebook Page. The dashboard method connects it for you via Facebook login — no developer app required.
2

Facebook App (CLI only)

Only needed for the CLI method. Create one at developers.facebook.com.
The dashboard connects Facebook via Facebook Login (OAuth) — you authorize Lua in a Facebook popup and pick your Page there, so there’s nothing to copy or paste. Use the CLI method if you’d rather supply a Page access token manually.
1

Open the dashboard

lua admin
Or visit https://admin.heylua.ai.
2

Open your agent

Click Agents in the main side navigation, then select your agent’s card.
3

Add a channel

Click the + (plus) icon to add a channel, then choose Facebook.
Add a channel
Screenshot: The agent’s add-channel (+) control and the channel options
4

Accept terms & connect

Tick the box to accept the Terms of Service and Privacy Policy, then click Connect.
5

Authorize with Facebook

A Facebook login popup opens. Log in, select the Page you want to connect, and grant the messaging permissions Facebook requests. When the popup closes, the channel is connected.
This popup is Facebook’s own UI and changes periodically. See Meta’s Messenger Platform documentation if you get stuck.
6

Connection success

Facebook appears in your connected channels and is ready to receive messages.

Connection Method 2: CLI (Advanced)

CLI Setup with Page Token

1

Get Page Access Token

From your Facebook App Dashboard:
  1. Go to your app
  2. Messenger → Settings
  3. Generate a Page Access Token
  4. Copy the token
See Meta’s Messenger Platform documentation for the current steps.
2

Get Page ID

From your Facebook Page:
  1. Go to page settings
  2. Copy Page ID
Or from URL: facebook.com/[page-id]
3

Run lua channels

$ lua channels
 Using agent: myAgent

? What would you like to do? 🔗 Link new channel
? Select channel type: 💬 Facebook Messenger

? Enter Facebook page access token: ****
? Enter Facebook page ID: 705555819301071

📡 Creating Facebook channel...

 Facebook channel created successfully!

💬 Page Name: My Business Page
📄 Category: Local Business
🔗 Webhook: https://wa.heylua.ai/fb/webhook/xyz789
4

Configure Webhook in Facebook App

  1. Go to App Dashboard
  2. Messenger → Settings → Webhooks
  3. Click “Add Callback URL”
  4. Paste the webhook URL from the CLI output
  5. Enter your verify token
  6. Subscribe to messages, messaging_postbacks, and messaging_optins
See Meta’s Messenger Platform Webhooks guide for the current UI.

Testing

1

Send a message to your Page

Open Messenger and send a message to your Page (for example, “Hi!”).
2

Agent responds

Your agent replies automatically in the Messenger thread.
3

View in admin

Monitor the conversation in the admin dashboard.
Admin conversation
Screenshot: The conversation in the admin dashboard

Features

Text Messages

Send and receive text

Rich Media

Images, videos, files

Quick Replies

Suggested response buttons

Templates

Reusable message templates

Best Practices

  • Respond quickly (within minutes)
  • Facebook shows “Typically responds in…”
  • Fast responses improve visibility
  • Set greeting message
  • Configure away message
  • Use quick replies
  • Add call-to-action buttons
  • Check page rating regularly
  • Respond to all messages
  • Address negative feedback

Next Steps

Instagram

Connect Instagram DMs

Email

Add email support