Publish a copilot to Facebook
You can add your copilot to Facebook Messenger to use the Facebook experience to engage with your end users.
Facebook Messenger and related services are subject to Facebook's own terms and conditions. For support related to Facebook Messenger, contact Facebook directly.
Important
This article is intended for experienced IT professionals who manage your organization's Facebook page.
Note
By publishing your copilot to a Facebook page, some of your data such as copilot content and end-user chat content will be shared with Facebook (meaning that your data will flow outside of your organization's compliance and geographic or regional boundaries).
For more information, see Facebook's Platform Policies.
Add your copilot to Facebook Messenger
You need a Facebook app, and an associated developer account, to connect your Copilot Studio copilot to Facebook Messenger on your Facebook pages.
To connect your copilot to Facebook Messenger:
Configure Facebook app settings: retrieve your Facebook app information, enable API access, add Facebook Messenger to your app, and configure the Facebook pages your app should appear on.
Configure the Facebook publication channel in Copilot Studio.
Connect your Facebook app to Copilot Studio using webhooks.
You will then need to submit your app for Facebook review before you can publish your app and make it public.
Configure Facebook app settings
Retrieve Facebook app information
Sign in to the Facebook app that you want to add your copilot to at Facebook for Developers.
Under Settings on the side menu pane, select Basic .
Copy the App ID and App Secret. You need these values when you configure the Facebook channel in Copilot Studio.
Enable API access for your Facebook app
Sign in to the Facebook app that you want to add your copilot to at Facebook for Developers.
Under Settings on the side menu pane, select Advanced.
Make sure Allow API Access to App Settings is set to Yes.
Select Save Changes to confirm your changes.
Add Facebook Messenger to your app
Sign in to the Facebook app that you want to add your copilot to at Facebook for Developers.
Go to the Dashboard. Under the Add a Product section, select Set Up on the Messenger tile.
Configure Facebook pages
Sign in to the Facebook App that you want to add your copilot to at Facebook for Developers.
Select Settings under Products and Messenger on the side menu pane.
Add the pages you want to add the copilot to by selecting Add or Remove Pages under the Access Tokens section. You can also create a new page by selecting Create New Page.
When adding pages, make sure Manage and access Page conversations in Messenger is set to Yes.
Copy the Page ID and Token for each of the pages that you want to add the copilot to. Select Generate Token for each page. You'll need these when you configure the Facebook channel in Copilot Studio.
Configure the Facebook channel in Copilot Studio
Open your copilot in Copilot Studio.
On the top menu bar, select Channels.
Select the Facebook tile to open the configuration window.
Paste the App ID, App Secret, Page ID, and Token you retrieved earlier into their corresponding fields.
At least one page is required, but you can select Add Page to add additional pages.
Select Add and wait for the success confirmation message. Once successful, copy the Callback URL and Verify token. You need these when you connect your Facebook app to Copilot Studio.
Connect your Facebook app to Copilot Studio
Sign in to the Facebook app that you want to add your copilot to at Facebook for Developers.
Select Settings under Products and Messenger on the side menu pane.
Under the Webhooks section, select Add Callback URL.
Provide the Callback URL and Verify token from the Configure the Facebook channel in Copilot Studio section and select Verify and Save.
Select Add Subscriptions for each page that you want to add the copilot to.
Select the following fields:
- messages
- messaging_postbacks
- messaging_optins
- message_deliveries
Select Save.
Submit for Facebook review
You need to submit your app for Facebook review before you can make your Facebook app public. Facebook requires a Privacy Policy URL and Terms of Service URL. You need to provide those on the Facebook basic app settings page (after signing in to your app at Facebook for Developers, select Basic under Settings on the side menu pane).
The Code of Conduct page contains third-party resources to help create a privacy policy. The Terms of Service page contains sample terms to help create an appropriate Terms of Service document.
Facebook has its own review process for apps that are published to Messenger. You can learn more about it at Sample submissions and Common rejection reasons. Your copilot will be tested to ensure it is compliant with Facebook's Platform Policies before approved by Facebook to become public.
Make the app public and publish the page
Until the app is published, it is in Development Mode. The copilot will not be public and it will work only for admins, developers, and testers.
After the review is successful, in the app's Dashboard under App Review, set the app to Public. Ensure that the Facebook Page associated with the copilot is published. The status appears in the Pages settings.
Remove your copilot from Facebook Messenger
When you do not want the copilot to be reachable in Facebook Messenger, you can remove the copilot from Facebook.
Open your copilot in Copilot Studio.
On the top menu bar, select Channels.
Select the Facebook tile to open the configuration window.
Select Delete.
Updating copilot content for existing conversations on Facebook
To prevent disruptions during a chat between a user and the copilot, existing conversations are not updated to the latest copilot content immediately after a new publish. Instead, the content is updated after the conversation has been idle for 30 minutes.
New conversations between a user and the copilot have the latest published copilot content.
Known limitations
- You need to create a new copilot if the Customer Satisfaction (CSAT) survey shows up as a non-interactive card image for a copilot created during public preview to access the latest CSAT content.
- It may take a few minutes before the copilot becomes reachable by users on Facebook pages after the Facebook channel is added.
- After removing the Facebook channel, it may take a few minutes before the copilot is removed fully and becomes unreachable on Facebook Messenger.
- After removing a Facebook page, it may take a few minutes before the copilot becomes unreachable by visitors to the removed page through Facebook Messenger.