In this post we show you how to connect aiaibot to Facebook Messenger. To follow these instructions, you will need an account on facebook.com. Your profile should also be connected to a Facebook page.
If you don't have a Facebook account or your profile is not connected to a page and you need help, explanations are available at the following links:
Please also note that the data entered via Facebook Messenger can leave Switzerland and the Europe zone.
Connection to Facebook
For aiaibot to send and receive messages via Facebook Messenger, we first need to connect your aiaibot project to your Facebook page. It’s quite a simple procedure:
- Log in to Facebook
- Ensure that you can log in to Facebook and access the Facebook page we are about to connect to aiaibot through your account.
- Go to your project settings
- You can find the settings in your project under the Settings item.
- You can then find all settings for your chatbot under the Chatbot tab.
- Connect your project to your Facebook page
- You can connect aiaibot to your Facebook page under Integrations > Messenger.
- Give aiaibot access to a page you are allowed to manage
- If you have not yet logged in to your Facebook account at this point, you can do so in the window that opens. If you are already logged in, you can continue with your user. You can then select which page you want to connect to your project in the dialog. In our example it looks something like this:
- Important: Please select only one Facebook page.
- If you manage multiple pages with your account, multiple Facebook pages may be listed. However, a project can only connect to one Facebook page. If you would like a bot on another page as well, please create a new project in aiaibot.
- Allow access via aiaibot
- The next step is to authorise aiaibot to do the following:
- aiaibot can manage your site. This is required in order for us to link your project to your site.
- aiaibot can manage and access conversations on your site. This is required in order for us to send stories created by you via your Facebook Messenger channel.
- Confirm and complete
- Congratulations! Once you’ve confirmed the configuration with Done and Facebook has confirmed the connection, your Facebook page will be displayed in our settings as follows:
- You can now run stories from your project on your Facebook page through your Facebook Messengerchannel. We show exactly how this works in the next section:
Creating a Facebook chatbot
This section assumes that you have successfully completed all steps under Connecting aiaibot to Facebook.
- Create a story in your project
- Create a new story in your project and select Facebook as the channel.
- You can now work in the story as usual. Instructions for this can be found here.
- Testing with Facebook
- Once we have saved, published and set the story to active, we can test the integration on our Facebook page. In our example it would look something like this:
Important: Since a Facebook page has only one chat window, only one story can be active. If you want to switch to a different story, you can simply deactivate the active story and set the new one to active.