💬 Facebook Messenger Integration on ViaSay
Easily connect your chatbot to Facebook Messenger with ViaSay’s integration features. In this guide, you’ll learn how to set up, configure, and manage your chatbot on Facebook Messenger, expanding your reach and engaging with users directly on the platform
Requirements:
- A Facebook Developer Account.
- Admin access to your Facebook page.
Step 1: Create a Facebook App
-
Log into your Facebook account and go to the Facebook App Dashboard.
-
Click Create App.
-
Choose the app type that best fits your needs, such as "Business."
-
Fill in your business details.
Example: If you're creating the app for "XYZ Enterprise," name it "XYZ Enterprise Chatbot" and add your email (e.g., [email protected]).
Step 2: Set up the Messenger Product on Your App
-
After creating the app, select Messenger under the available products and click Set up.
-
In the sidebar, click Messenger → Settings.
Step 3: Link the App to Your Facebook Page
-
Scroll to Access Tokens and click Add or Remove Pages.
-
Select your desired page and click Next.
Ensure you are an Admin of the page.
- Toggle to Yes and click Done.
- A validation message will appear; click Ok to close it.
Step 4: Generate a Page Access Token
- Go to Facebook Token Generator and click Generate token.
Save the token, as it will only be shown once.
-
In the ViaSay platform, navigate to User Channels and create a Facebook Channel.
-
Paste the token into the User Channel page and click Update token.
Step 5: Set up the Callback URL
-
In ViaSay, go to Channels → Facebook Messenger → General and copy the Callback URL and Verification Token.
-
In your Facebook app settings, scroll to Webhooks and click Add Callback URL.
- Paste the Callback URL and Verification Token and click Verify.
Step 6: Add Subscriptions
-
Click Add Subscriptions in the Webhooks section.
-
Select the subscriptions you want (e.g., messages, messaging_postbacks).
Do not select message echoes.
Step 7: Install the App on Your Facebook Business Page
-
Go to Settings → Advanced Messaging in Facebook.
-
Configure the Handover Protocol and select your newly created app as the primary receiver.
-
Optionally, set a secondary receiver using the Facebook Handover API.
⚠️ Only users with a role on the app or page can test the bot. To enable others, add them as testers on both the app and page.
Step 8: Submit for App Review
- Before submitting, select the necessary permissions under App Control → Permissions (e.g., pages_messaging).
- Submit your app for Facebook review.
Bonus: Emergency Unplugging of Messenger Chatbot
We always recommend modifying the chatbot to add an emergency use case/message rather than unplugging the bot from Messenger.
To disconnect your chatbot:
- Go to the Facebook Messenger Channel in ViaSay.
- Click Update Token and leave the field empty to break the connection.
- Test by interacting with the bot to confirm the disconnection.
To reconnect, follow Steps 4 and 5 above.