Facebook Page Connection
Connect your Facebook business page to receive and respond to Messenger messages in your Cloud-PBX unified inbox.
Overview
Facebook Messenger Authentication connects your Facebook business page to Cloud-PBX using Facebook's Messenger Platform API.
Requirements:
- Facebook business page (not personal profile)
- Page administrator access
- Facebook App with Messenger permissions
- Webhook endpoint for receiving messages
Configuration Steps
Verify Page Administrator Access
Ensure you have admin access to the Facebook page:
- Go to your Facebook page
- Click Settings (left sidebar)
- Click Page Roles
- Verify you're listed as Admin
If not admin, request access from current page admin.
Admin Access Required
You must be a page administrator to connect Messenger to Cloud-PBX.
Enable Messenger on Your Page
Activate Messenger for your Facebook page:
- Go to Page Settings → Messaging
- Toggle Allow people to contact my Page privately to ON
- Review and configure Messenger settings:
- Response time
- Away message
- Instant replies
- Save changes
Your page can now receive messages!
Create Facebook App (if needed)
Cloud-PBX needs a Facebook App to access Messenger API:
Option A: Use Cloud-PBX Managed App (Recommended):
- Cloud-PBX provides pre-configured Facebook App
- Simpler setup process
- Skip to Step 4
Option B: Create Your Own Facebook App:
- Go to developers.facebook.com
- Click My Apps → Create App
- Select Business as app type
- Fill details:
- App Name: "Your Business - Messaging"
- Contact Email: Your email
- Business Account: Select or create
- Click Create App
- In app dashboard, click Add Product
- Find Messenger and click Set Up
- App is now ready for configuration
Connect Page to Cloud-PBX
Link your Facebook page:
- Navigate to Messaging → Facebook → Authentication
- Click Connect Facebook Page
- Facebook login window opens
- Log in with Facebook account (page admin)
- Select page(s) to connect
- Grant permissions:
- Manage and access Page conversations in Messenger
- Read content posted on the Page
- Show a list of the Pages you manage
- Click Continue
- Page appears in Cloud-PBX as connected
Page Connected
Your Facebook page is now connected to Cloud-PBX!
Configure Webhooks
Cloud-PBX automatically configures webhooks, but verify:
- In Cloud-PBX, go to Messaging → Facebook → Webhooks
- Verify webhook status: Active
- Webhook URL:
https://your-pbx-domain.com/api/messaging/facebook/webhook
Webhook Events Subscribed:
messages- Incoming messagesmessaging_postbacks- Button clicksmessaging_optins- Opt-in eventsmessage_deliveries- Delivery confirmationsmessage_reads- Read receipts
Manual Webhook Setup (if using your own Facebook App):
- Go to Facebook App dashboard
- Navigate to Messenger → Settings
- In Webhooks section, click Add Callback URL
- Callback URL:
https://your-pbx-domain.com/api/messaging/facebook/webhook - Verify Token: Copy from Cloud-PBX (Settings → Facebook → Webhook Token)
- Click Verify and Save
- Subscribe to webhook events (list above)
- Save configuration
Test Integration
Verify end-to-end messaging:
Inbound Test:
- From your personal Facebook account, go to your business page
- Click Message button
- Send test message: "Testing Cloud-PBX integration"
- Verify message appears in Cloud-PBX inbox
- Check message details (sender, timestamp, content)
Outbound Test:
- In Cloud-PBX inbox, click on test conversation
- Type reply: "Test successful!"
- Send message
- Verify reply appears in Facebook Messenger (your personal account)
- Check for read receipts
Feature Test:
- Send image from Facebook Messenger
- Verify image appears in Cloud-PBX
- Reply with quick reply buttons from Cloud-PBX
- Verify buttons appear in Facebook Messenger
Integration Complete
Facebook Messenger is fully operational!
Configure Page Settings (Optional)
Optimize Messenger experience:
- Go to Messaging → Facebook → Page Settings
- Greeting Text: Customize welcome message
- Example: "Hi! Thanks for contacting us. How can we help today?"
- Response Time: Display expected response time
- Options: Minutes, Hours, A day, A few days
- Away Message: Configure after-hours message
- Enable during closed hours
- Example: "Thanks for your message! We're currently closed but will respond tomorrow."
- Instant Reply: Auto-response to first message
- Example: "Thanks for reaching out! An agent will be with you shortly."
- Save settings
Page Access Token
What is Page Access Token?
- Authentication credential for API access
- Allows Cloud-PBX to send/receive messages on behalf of your page
- Generated when you connect page
- Stored securely in Cloud-PBX
Token Management:
- Automatic Renewal: Cloud-PBX refreshes tokens automatically
- Expiration: Tokens typically valid for 60 days (then auto-refreshed)
- Manual Refresh: Reconnect page if issues arise
- Security: Never share token publicly
Token Permissions:
pages_messaging- Send and receive messagespages_read_engagement- Read page contentpages_manage_metadata- Manage page settings
Webhook Security
Webhook Verification:
- Facebook signs webhook requests with SHA-256 signature
- Cloud-PBX validates signature automatically
- Prevents spoofing and unauthorized access
- Only accepts requests from Facebook IPs
Security Best Practices:
- Use HTTPS only (never HTTP)
- Validate all webhook signatures
- Implement rate limiting
- Log all webhook activity
- Monitor for suspicious patterns
- Keep webhook URL private
Multiple Pages
Connect Multiple Facebook Pages:
If you manage multiple Facebook pages:
- Go to Messaging → Facebook → Pages
- Click Add Page
- Repeat authentication process
- Select additional page
- Page added to list
Per-Page Configuration:
- Each page has separate routing rules
- Independent auto-responses
- Separate analytics
- Different agent assignments
Page Switching:
- Agents see all pages in unified inbox
- Filter by page if needed
- Page name/logo shown on each message
- Reply automatically uses correct page
App Review (if using your own Facebook App)
Development vs Live Mode:
- Development: Only admins can use
- Live: Public can message page
Switching to Live Mode:
- Go to Facebook App dashboard
- Navigate to App Review → Permissions and Features
- Request review for:
pages_messagingpages_manage_metadata
- Provide:
- App purpose
- Privacy policy URL
- Terms of service URL
- Use case description
- Submit for review
- Approval typically 3-5 business days
- Once approved, toggle app to Live mode
Cloud-PBX Managed App
If using Cloud-PBX's managed Facebook App, it's already in Live mode. No app review needed!
Troubleshooting
Can't Connect Page:
- Verify you're page administrator (not editor or moderator)
- Check page is published (not draft)
- Ensure Messenger enabled on page
- Try different browser or clear cache
- Verify Facebook account not restricted
Webhook Not Receiving Messages:
- Check webhook status in Cloud-PBX (should be "Active")
- Verify webhook URL publicly accessible (HTTPS)
- Test webhook URL with Facebook's test tool
- Review webhook logs for errors
- Confirm subscribed to correct events
- Check SSL certificate valid
Page Access Token Invalid:
- Reconnect page to refresh token
- Verify page still exists and not deleted
- Check admin access not revoked
- Review Facebook App status (not disabled)
- Token may have expired (reconnect)
Messages Delayed:
- Check webhook response time (must be under 20 seconds)
- Verify server performance (not overloaded)
- Review Facebook platform status (possible outage)
- Check network connectivity
- Increase webhook timeout if needed
Permission Denied Errors:
- Reconnect page to refresh permissions
- Verify all required permissions granted
- Check Facebook App approved (if using own app)
- Review app restrictions or limits
- Contact Facebook support if persists
Disconnecting a Page
To Disconnect Facebook Page:
- Go to Messaging → Facebook → Pages
- Find page to disconnect
- Click Disconnect
- Confirm disconnection
- Page removed from Cloud-PBX
What Happens:
- Cloud-PBX stops receiving messages
- Conversation history preserved (read-only)
- Page continues functioning normally on Facebook
- Can reconnect anytime
Reconnecting:
- Follow same authentication process
- Previous settings may need reconfiguration
- Conversation history remains
Security & Privacy
Data Handling:
- Message content encrypted in transit and at rest
- Customer data handled per privacy policy
- Comply with GDPR, CCPA requirements
- Message retention configurable
- Audit logs track all access
Access Control:
- Role-based permissions in Cloud-PBX
- Limit who can view/respond to messages
- Monitor agent activity
- Revoke access when needed
Facebook Privacy:
- Follow Facebook Community Standards
- Respect customer privacy
- Don't share customer data inappropriately
- Provide clear privacy policy
- Handle data deletion requests
Next Steps
Authentication Complete
Facebook Messenger is connected! Configure settings and routing next.
- Configure Settings: Set up auto-responses and greeting in Facebook Settings
- Create Routing: Route messages to appropriate teams in Message Queues
- Train Team: Familiarize agents with Messenger features
- Promote: Let customers know they can message your page
- Monitor: Track response time and customer satisfaction