integration

How To Build an AI Chat Bot on Facebook Messenger

Step by step guide on how to launch an AI chat bot on Facebook Messenger. It's straightforward - no coding required!

How To Build an AI Chat Bot on Facebook Messenger

☝️ is what it’s going to look like once we’re finished.

In this guide, we’re going to follow 5 simple steps to create a smart conversational AI that anyone can talk to via Facebook Messenger:

  1. Verify your business with Facebook
  2. Create your Facebook bot app
  3. Configure your Facebook bot app
  4. Create a Quickchat.ai account
  5. Integrate your Facebook bot app with Quickchat.ai

1. Verify your business with Facebook

In order to connect your Facebook Messenger (or Instagram) to an AI chat bot via Quickchat, your business needs to be verified on Facebook. Detailed instructions on how to do that are available on Facebook’s Business Help Center page. You will be required to provide additional information about your business and wait for the verification to be completed.

2. Create your Facebook bot app

While you’re waiting for your Business to be verified, you can already go ahead and look into creating a Facebook app to serve your AI chat bot.

Head over to developers.facebook.com/apps, click on Create App and follow the steps.

Select None as app type

Select None as app type

Provide app name, contact email address and select your Business Account

Provide app name, contact email address and select your Business Account

3. Configure your Facebook bot app

First of all, add Messenger and Webhooks products:

Add Messenger and Webhooks products

Add Messenger and Webhooks products

Once added, they will appear on the left-hand side:

Added products appear on the left-hand side

Added products appear on the left-hand side

In Messenger settings, you first need to select your Facebook page through which you want your AI to be talking to users. If the Page does not appear in the list, please make sure that your business verification has been completed and that you are logged in to as a Facebook account that has permissions to manage that Page.

Add the Facebook Page where your AI will be implemented

Add the Facebook Page where your AI will be implemented

Once you’ve added your page, generate Page access token and save it somewhere safe. Also copy your Page ID number. You will then need to paste them into the Quickchat dashboard.

Generate and save Page access token

Generate and save Page access token

As a next step, go to your app’s basic settings and set your Privacy policy URL, Contact email and Category. Once you’ve done that, set your app live at the top.

Set Privacy policy URL, Contact email and Category, and set your app live.

Set Privacy policy URL, Contact email and Category, and set your app live.

While on this page, also take note of your App secret which you will also need to paste into the Quickchat dashboard.

Take note of your App secret.

Take note of your App secret.

4. Create a Quickchat.ai account

Quickchat.ai allows you to create your own AI Assistant that has great conversational skills and general world knowledge by default, out of the box.

If you want to, you can give your AI specific knowledge about your company, project, product or virtually anything else. If you want to learn how to do it, watch our 10-minute video guide on YouTube.

But even without any specific knowledge the Quickchat engine makes a great conversation partner so we’re going to go with that for now. Head over to quickchat.ai and create your account:

Start building

Start building

Subscribe for the 2-week trial for just $14.

Subscribe and pay with Stripe

Subscribe and pay with Stripe

5. Integrate your Facebook bot app with Quickchat.ai

In the Interactions section of the Quickchat dashboard, paste your Facebook Page ID, App secret and Access token you found in previous steps.

Paste your Facebook Page ID, App secret and Access token

Paste your Facebook Page ID, App secret and Access token

The final step will be to integrate and verify the Quickchat webhook endpoint which will receive your message events. Go back to your Facebook app’s Messenger settings and click on the Edit callback URL button.

Edit callback URL

Edit callback URL

Set the correct callback URL as shown below while your Verify token can be found in the Quickchat dashboard as shown above.

Provide callback URL and Verify token, and Verify and safe

Provide callback URL and Verify token, and Verify and safe

Once the Callback URL has been correctly added, click on the Add subscriptions button and select Subscription field messages.

Select Subscription field messages

Select Subscription field messages

Once correctly configured and saved, your Webhooks sections is going to look something like this:

Correctly configured Webhooks section

Correctly configured Webhooks section

And that’s it! 🎉 Your AI chat bot is ready to be tested on Facebook Messenger:

End goal - smart conversational AI that anyone can talk to on Facebook Messenger

End goal - smart conversational AI that anyone can talk to on Facebook Messenger

Share this article:

comments powered by Disqus