# Facebook Messenger

Facebook Messenger (or simply Messenger) is used by over 1.3 billion people each month. Some of the key features and functionalities supported by Facebook Messenger bots include:

1. **Text-Based Conversations**: Messenger bots engage in text-based conversations with users, responding to messages, questions, and prompts.
2. **Rich Media Messages**: Send various types of rich media, including images, GIFs, videos, and audio clips, to make interactions more engaging and visually appealing.
3. **Quick Replies**: Provide users with quick reply buttons to guide them through predefined options or actions, making interactions more user-friendly.
4. **Persistent Menus**: Persistent menus that allow users to access specific features or functionalities at any point during the conversation. These menus are typically displayed at the bottom of the chat window.
5. **Postback Buttons**: Postback buttons allow users to trigger specific actions or functions within your bot when clicked. They are often used for tasks like making a reservation or navigating menus.
6. **Webview**: Open a webview within the Messenger app, enabling users to interact with web-based content or complete transactions without leaving the chat.
7. **Payment Integration**: Facilitate payments, allowing users to make purchases, donations, or payments for services directly within the conversation.
8. **Location Sharing**: Users can share their location with your bot, which is useful for services like finding nearby stores, restaurants, or services.
9. **Templates**: Use structured message templates to present information in a visually organized way. Examples include receipts, confirmations, and lists.
10. **User Authentication**: Integrate with Facebook's user authentication, allowing businesses to verify user identities and provide personalized services.
11. **Subscription Messaging**: Send non-promotional messages to users who have opted in to receive updates. These messages are often used for news, updates, and notifications.
12. **Broadcasting**: Send messages to a list of subscribers or segmented groups, similar to email marketing.
13. **AI and NLP Integration**: Integrate with AI and natural language processing (NLP) technologies to understand and respond to user messages more intelligently and conversationally.
14. **Analytics and Insights**: Analytics tools that allow businesses to track your bot performance, user engagement, and conversion rates.
15. **Chat Plugins**: Embed Messenger chat plugins on your websites, enabling users to initiate conversations with your bot directly from your website.
16. **Handover Protocol**: Seamlessly hand over conversations to human agents when needed, ensuring a smooth transition between automated and human support.
17. **Multilingual Support**: Programmed to support multiple languages, allowing businesses to reach a global audience.
18. **Integration with Third-Party Services**: Integrate with external services, such as CRM systems, e-commerce platforms, and databases, to provide your users with real-time information and services.
19. **Customization and Branding**: Customize the bot's appearance, name, and profile picture to align with your branding and provide a consistent user experience.

These features make Facebook Messenger bots versatile tools for startups and enterprises to engage with users, provide customer support, automate tasks, and offer a wide range of services within the Messenger platform.

## Prerequisites

In order to integrate Facebook Messenger with your Bot, you will need the following:

* A [Facebook account](https://www.facebook.com/)
* A [Facebook Page](https://www.facebook.com/pages/creation/) so your users can message your bot

When a user sends a message to your Facebook Page, your BotDistrikt bot will reply to them.

## Setup

From your bot account, go to **Integrations**

Select **Messenger**

<figure><img src="/files/gYAxd6INNQ9F4obkNYCD" alt=""><figcaption><p>Integrations page</p></figcaption></figure>

Click on **Continue with Facebook**

<figure><img src="/files/oJ0yExhASkM3SAXOP46Q" alt=""><figcaption><p>Continue with Facebook</p></figcaption></figure>

Click **Continue as (yourself).**

<figure><img src="/files/FddFwyom12aJdtxCWuwu" alt="" width="375"><figcaption><p>Continue with Personal Profile</p></figcaption></figure>

**Select the Facebook Page** you want to launch your bot on. You may select multiple pages if you manage multiple bot accounts on BotDistrikt.

<figure><img src="/files/jfnifSO0u6dgwnF1CaGh" alt="" width="375"><figcaption><p>Multiple bots option</p></figcaption></figure>

Grant access to all required permissions.

Click **Save.**

<figure><img src="/files/CQ3QV8JJiYmPfHYxgdnW" alt="" width="375"><figcaption></figcaption></figure>

Click **Got it.**

<figure><img src="/files/hcrykbhfzmV53EL7euHS" alt="" width="375"><figcaption><p>Link BotDistrikt Bot to your Business Page.</p></figcaption></figure>

You will be redirected to the BotDistrikt Messenger page.&#x20;

On the Facebook Page dropdown, select the page you want to launch your bot on.

Your page details appear on and under the photo on the left.

Click on **Link to Messenger.**

<figure><img src="/files/5zAfZunvBaWXkT62W3Sb" alt=""><figcaption></figcaption></figure>

Your bot is now live on your Facebook Page

<figure><img src="/files/jCJkebk4KIRbSjHNytwi" alt=""><figcaption><p>Live Bot</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.botdistrikt.com/messaging-channels/facebook-messenger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
