Connect your chatbot to Facebook Messenger

Connect your chatbot to Facebook Messenger to quickly reply to customer messages, respond to order tracking questions, make personalized product recommendations, and answer customer FAQs in Facebook Messenger. This article will walk you through the steps to configure the Heyday chatbot to send and receive messages through Facebook Messenger.

Audience: Heyday administrators

Before you begin

You must have a Facebook Page to connect the Heyday bot to Facebook. See the Meta help article Create a Facebook Page for your business.

Tip: Create a test page to work on prior to making changes on your Business Page.

Connect your Facebook Pages to Heyday

To integrate Heyday with Facebook Messenger, you must first connect your Facebook Pages to Heyday.

  1. Go to Heyday Settings , expand Channels, and then select Facebook Messenger.
  2. Select Login with Facebook and sign in using your Facebook Page administrator account and password.
  3. Select the Facebook Pages you want to connect and follow the steps to authorize the connections.

Note: When you connect multiple Pages, you may have to wait a bit for them to load.

Connect your Heyday bot to your Facebook Pages

Now that you've connected your Facebook Pages to Heyday, you can set Heyday up to send and receive messages from them.

  1. Go to Heyday Settings , expand Channels, and then select Facebook Messenger.
  2. Select Request connection next to the Pages you want to connect to the bot.
  3. Your requests will show as Pending while the Heyday team confirms the Facebook Page is ready.
  4. Once the Facebook Page is ready, turn on the connection.
    Example of Facebook Page connections with one Page showing as connected and the other as disconnected.
  5. Go to your Facebook Page settings and assign Heyday as the primary receiver and Page Inbox as the secondary receiver. You can find instructions on how to do this in the Meta help article Conversation control.
    Facebook Page manager showing primary and secondary receiver settings.

Turn on Facebook guest mode

Guest mode allows customers to chat with you via Facebook Messenger without needing to log in to their Facebook account. If you want this feature, follow the instructions in the Issues with guest users section of the Meta article Guest Mode for Messenger.

Troubleshooting

Cannot add another Facebook Page - If you don't see the option to Add another page, select Log out next to Logged in to Facebook as <your name>. Then select Login with Facebook to log back in.

Chat window flashes in Chrome - The Google Chrome browser flashes chat windows open and closed. Turn off Use hardware acceleration when available to turn the flashing off. To do this, open your Chrome browser settings, search for hardware acceleration, and turn it off.

You're already using the Meta SDK for something other than Heyday chat - The Heyday messenger chat widget uses the Meta SDK. If your website is already calling the Meta SDK, calling the Heyday chat requires you use the following additional steps to work properly.

  1. Follow the instructions in the Meta help article Customer Chat SDK to install the SDK. After this, you will not use the <script src="//connect.facebook.net/en_US/all.js"></script> to initiate customer chat.
  2. Replace define window.fbAsyncInit with define window.hdAsyncInit (see the following example code). You can add your Heyday code snippet here. We'll call this function once the chat is initialized.

Following is an example of the code:

Copy
window.hdAsyncInit = clientAsyncInit;
<script>https://api.heyday.ai/v130/xxx/yyy/zz_ZZ/setupchat.js</script>
function clientAsyncInit() {
    FB.init({
         appId: appId,
         xfbml: true,
         version: 'v7.0',
         status: true // set to true to refresh status on every load
    });
    // continue calling Facebook
}

When hdAsyncInit is called, you can make the call you had to FB.init.