๐ Facebook Messenger
Facebook Messenger Bot
Connect your Facebook Page to CodeCanvas and automatically reply to customer messages in Messenger.
โฑ 10 minutes ยท Intermediate
โ ๏ธYou need a Facebook Page (not a personal profile) and a Meta Developer account to use Messenger API.
1
Create a Meta Developer App
- Go to developers.facebook.com and log in
- Click My Apps โ Create App
- Select Business type โ Enter app name and email
- Click Create App
2
Add Messenger Product
- In your app dashboard, find Messenger and click Set Up
- Under Access Tokens, click Add or Remove Pages
- Select your Facebook Page and grant permissions
- A Page Access Token will appear โ copy it
๐กThe Page Access Token is a long string starting with EAAG... โ this is what CodeCanvas needs to send replies.
3
Create Bot on CodeCanvas
4
Configure Webhook in Meta
- In Meta App โ Messenger โ Webhooks โ click Add Callback URL
- Paste your CodeCanvas webhook URL as Callback URL
- Enter your bot's secret as the Verify Token (find in bot settings)
- Click Verify and Save
- Under Webhook fields, subscribe to messages and messaging_postbacks
5
Subscribe Your Page
- Under Webhooks, find your Page and click Subscribe
- This tells Facebook to send your Page's messages to your webhook
6
Test It!
- Open Facebook and send a message to your Page
- It should appear in your CodeCanvas Messages dashboard
- If you have flows set up, the bot replies automatically in Messenger!
โ ๏ธNew apps are in Development Mode โ only app admins and testers can message. To go live, submit your app for Meta review.