Facebook Messenger

How to connect a Facebook page

If you already have a Facebook business page, you can connect a bot to it.

IMPORTANT!

First, create a Facebook Business page.

To connect Facebook to MaviBot, go to the "Messengers" section and select Facebook.

Log in to authorize access to your account in the pop-up window. After authorization, you will see a list of your business pages available for connection. Select the one you want to use.

You may be offered to connect your Instagram Business accounts as well, but this is optional.

Next, select the page you want to connect the bot to. Then, choose the permissions for the bot. Be sure to enable all the toggles.

If the process was successful, you will see the following window.

You will see a default "Start" button after entering the group.

Don’t forget to include this word in the conditions of the start block.

The welcome message that the user sees before clicking the "Start" button is configured in the Facebook page settings.

What to do if the required page is not in the list

If you don’t see the group you need in the list, it probably means the builder doesn’t have permissions for that group. You need to grant them.

To do this:

Log out from the system using the button in the top right corner.

Click "Log in with Facebook."

Click "Edit settings".

Choose the page you want and follow all the steps described at the beginning of the article.

How to create broadcasts on Facebook

It applies to any messages you send: through chatbots, mass broadcasts, or messages sent manually.

When a user subscribes to a chatbot or initiates a conversation with the company’s page, you have a 24-hour window from that moment to send the user any messages, including promotional ones.

  1. If the user doesn’t respond within 24 hours, Facebook allows you to send one more message. This message may include a button and a strong offer to attract the subscriber’s attention and prompt a response.

  2. If the user replies within the 24-hour window, a new 24-hour window opens. This happens every time he responds to a message from the chatbot.

This rule has a few exceptions. More details: https://developers.facebook.com/docs/messenger-platform/policy/policy-overview One of them is Message tags — a permitted type of message that can be sent even after the 24-hour window has passed. There are 16 types of Message tags. We chose to use confirmed_event_update – "Event Reminder." In the future, we may add the option to choose which type of message you want to send.

An advantage of this solution is that broadcasts don’t require moderation. It also gives you a way to work around the 24+1 rule.

How to work with Facebook Pixel

Facebook requires the use of verified domains. For detailed instructions on installing the Pixel, read HERE.

Let’s consider an example of a carousel with 3 cards. To create the cards, you need to enter the following into the "Calculator" field.

p = [ {"title": "TITLE", "description": "DESCRIPTION OF CARD 1", "image": "LINK TO IMAGE 1", "buttons": [{"text": "BUTTON TEXT 1"}]}, {"title": "TITLE", "description": "DESCRIPTION OF CARD 2", "image": "LINK TO IMAGE 2", "buttons": [{"text": "BUTTON TEXT 2"}]}, {"title": "TITLE", "description": "DESCRIPTION OF CARD 3", "image": "LINK TO IMAGE 3", "buttons": [{"text": "BUTTON TEXT 3"}]} ]

r = send_carousel(p, '')

Please note: The line r = send_carousel(p, '') should be entered on a new line in the calculator input field.

First, assign an array with title, description, image, and buttons to the variable p (you can name the variable differently). Then, use it in the method send_carousel(p, '').

You can also use the table to simply insert the needed titles, links, etc., and then just copy the result into your block.

In the "Response" field, leave #{None}.

You can insert URLs into the buttons on carousel cards. When a user clicks a button, he will be redirected to the link.

To add a link to a button on a card, include it in the following array:

p = [ { "title": "title", "description": "DESCRIPTION OF CARD 1", "image": "LINK TO IMAGE 1", "buttons": [ { "text": "BUTTON TEXT 1", "url": "LINK FOR BUTTON" } ] } ]

An additional optional parameter payload has been added to carousel card buttons. This parameter won’t be visible to the user but allows you to track and analyze the user’s choice.

Since it’s often necessary to have carousel cards with the same button text, an additional parameter called payload has been added.

This parameter won’t be visible to the user but allows you to analyze their choice:

Please pay attention to its correct usage: p = [ { "title": "title", "description": "DESCRIPTION OF CARD 1", "image": "LINK TO IMAGE 1", "buttons":[{"text": "BUTTON TEXT 1", "payload": "1"}] }, { "title": "title", "description": "DESCRIPTION OF CARD 2", "image": "LINK TO IMAGE 2", "buttons": [{"text": "BUTTON TEXT 1", "payload": "2"}] }, { "title": "title", "description": "DESCRIPTION OF CARD 3", "image": "LINK TO IMAGE 3", "buttons": [{"text":"BUTTONTEXT 1"}] } ]

The payload parameter is optional and can be omitted, as shown in the figure of button 3.

Last updated