# Integrate Chat Platform: FB Messenger

## <mark style="color:blue;">Pre-Integration Checklist</mark>

**MaiAgent Preparation**

* An "AI Assistant" has been created on the [MaiAgent platform](https://admin.maiagent.ai/)

**Facebook Permission Preparation**

* Facebook account has been invited to or has created a Business Manager
* Has "Full Control" permission for that Business Manager

**Fan Page Permission Confirmation**

* If the fan page is already under Business Manager: No additional adjustments needed
* If the fan page is not under Business Manager: Must be an administrator of the fan page with full control permission

<div><figure><img src="/files/tS8cNZcRt1Yt135awyIY" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="/files/1mSnSckRLmOM8yjZlmas" alt="" width="298"><figcaption></figcaption></figure></div>

<figure><img src="/files/iKpBPoramYNg1sH0BKAw" alt=""><figcaption></figcaption></figure>

## <mark style="color:blue;">Start Integration</mark>

### 1. Go to MaiAgent's messaging platform page and click "Integrate Messaging Platform"

a. Click <mark style="color:blue;">Integrate Messaging Platform</mark> in the upper right corner

<figure><img src="/files/Gk7GEbv8q8rSjdur51Pq" alt=""><figcaption></figcaption></figure>

b. Select Messenger

<figure><img src="/files/AJY4cFLfnybXV1slaWsI" alt=""><figcaption></figcaption></figure>

c. Log in with the Facebook account associated with the fan page.

<figure><img src="/files/vEUUNLy8BjPX0LjMf5yc" alt=""><figcaption></figcaption></figure>

### 2. Select the business and select (claim) the fan page.

<figure><img src="/files/hXM0KjWNSEb2lNEAcpdn" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/bpB8BH4OehbhgMNvevpF" alt=""><figcaption></figcaption></figure>

Confirm authorization, and upon successful creation, hosting is complete.

<figure><img src="/files/uLPxUTbxc5HJViTWnmbf" alt=""><figcaption></figcaption></figure>

### 3. AI Assistant Settings

Enter the messaging platform name, select the AI Assistant and Messenger channel (which is the fan page you just claimed)

<figure><img src="/files/Qk963uMjhJPKjYrnX06D" alt=""><figcaption></figcaption></figure>

### 4. Verify Integration Results

Next, you can try sending a test message to that messaging platform in MaiAgent's internal chat. If the AI Assistant can respond normally, the integration is successful.

<figure><img src="/files/VzRYQj2uQwqbs1cDs4QW" alt=""><figcaption></figcaption></figure>

You can also open the AI Assistant conversation on the fan page and send a test message. If the bot can respond normally, the integration is successful.

<figure><img src="/files/gZJYGf48JBv4zRgQPzbh" alt=""><figcaption></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.maiagent.ai/maiagent-user-guide/maiagent-user-guide-en/release/fb.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.
