Overview
The Facebook Messenger integration supports:- Receiving messages from your Facebook Pages
- Message processing by AGO agents
- Text messages with support for long responses (auto-split at 2000 characters)
- Media messages (images, documents, audio, video)
- Secure webhook validation with HMAC-SHA256
Prerequisites
Before setting up the integration, you need:- Facebook Page: A Facebook Page that you manage with admin access
- OAuth Link: A connection link provided by the AGO team
Setup Guide
1
Request Access from AGO Team
Contact the AGO team to receive your OAuth connection link. This link will allow you to authorize your Facebook Page to work with AGO.
2
Authorize Your Facebook Page
- Click on the OAuth link provided by AGO
- Log in to Facebook if not already logged in
- Select the Facebook Page(s) you want to connect
- Grant the required permissions (messaging permissions)
- Complete the authorization flow
3
Verify the Connection in AGO
- Log in to your AGO Admin panel
- Navigate to Settings > Integrations > Messenger
- Your connected page(s) should appear in the list
- Verify the connection status shows “Connected”
4
Assign an Agent (Optional)
- In the Messenger integration page, find your connected page
- Click Assign Agent
- Select the agent that should handle messages from this page
- Click Update Agent
Supported Message Types
Incoming Messages (From Users)
Outgoing Messages (From AGO)
Features
Long Message Handling
Facebook Messenger has a 2000 character limit per message. AGO automatically splits longer responses intelligently:- Prioritizes splitting at paragraph breaks
- Falls back to sentence endings
- Then word boundaries
Agent Assignment
You can assign specific agents to each Facebook Page:- Messages are routed to the assigned agent
- If no agent is assigned, the default agent handles messages
- Change agent assignments anytime in the admin panel
Message Queuing
When users send multiple messages rapidly (within 2 seconds), AGO:- Queues the messages
- Merges them into a single request
- Provides a unified response
Human Takeover Detection
AGO automatically detects when a human operator responds on the Facebook Page:- If a human replies from the Page, AGO pauses automated responses
- This prevents duplicate or conflicting responses
- Normal operation resumes when the human conversation ends
Troubleshooting
Common Issues
Common Issues
Page Not Appearing After Authorization
- Ensure you have admin access to the Facebook Page
- Try the authorization flow again
- Contact AGO support if the issue persists
- Check that the page is marked as “Connected” in AGO
- Verify an agent is assigned to the page
Checking Connection Status
Checking Connection Status
- Go to Settings > Integrations > Messenger
- Check the status badge on each page:
- OAuth Connected: Page is working
- Webhook Active: Webhook is properly receiving events
- Webhook Inactive: Contact AGO support
Security
The Messenger integration includes several security measures:- Webhook Signature Validation: All incoming webhooks are validated using HMAC-SHA256
- Encrypted Token Storage: Page access tokens are encrypted at rest
- OAuth Flow: Secure authorization via Facebook’s official OAuth flow
Limitations
- Only one AGO tenant can connect each Facebook Page (unique constraint)
- Interactive message templates are not currently supported
- Only text responses are supported (no images or documents from AGO)
Support
If you encounter issues:- Check the troubleshooting section above
- Contact the AGO team with your Page name and any error messages
