Facebook Messenger
How to connect a Facebook page
If you already have a Facebook business page, you can connect a bot to it.
IMPORTANT!
Make sure to create a Page, not a Group. Chatbots on Facebook can only be connected to Pages.
A bot can only be connected by a page owner or an administrator.
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.
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.
Messages must be enabled for the page.
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.
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.
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.
After 24 hours from the user’s last interaction, you are only allowed to send messages related to event reminders — such as confirming upcoming bookings, notifying about schedule changes, or reminding users of appointments or events they’ve signed up for.
Sending any kind of promotional content after the 24-hour window is strictly prohibited. Violating this rule may lead to your Facebook page being blocked.
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
To install the Pixel on our mini landing page, you need to link your own domain to it.
Facebook requires the use of verified domains. For detailed instructions on installing the Pixel, read HERE.
How to create a carousel

A carousel may contain from 2 to 10 cards (slides).
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!
When creating a carousel card description like
{"title":"TITLE", "description": "DESCRIPTION OF CARD 1", "image": "LINK TO IMAGE 1", "buttons":[{"text":"BUTTON TEXT 1"}]}
it’s important to fill in either the title and description or the image parameter.
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}.

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" } ] } ]
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