# 串接對話平台：FB Messenger

## <mark style="color:blue;">串接前確認</mark> <a href="#pre-integration-checklist" id="pre-integration-checklist"></a>

**MaiAgent 準備**

* 已在 [MaiAgent 平台](https://admin.maiagent.ai/)上建立好一個「AI 助理」

**Facebook 權限準備**

* Facebook 帳號已被邀請或建立過商家資產管理組合
* 擁有該商家資產管理組合的「完整控制權限」

**粉絲專頁權限確認**

* 如果粉專已在商家資產管理組合下：無需額外調整
* 如果粉專不在商家資產管理組合下：必須是該粉絲專頁的管理人員且擁有完整控制權限

<div><figure><img src="/files/FLHlsi7PQ6STNF8bNlkc" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="/files/21HBfaades3105SUdHmy" alt="" width="298"><figcaption></figcaption></figure></div>

<figure><img src="/files/8pQtz9CImDWqfyDVmUJe" alt=""><figcaption></figcaption></figure>

## <mark style="color:blue;">開始串接</mark> <a href="#start-integration" id="start-integration"></a>

### 1. 到 MaiAgent 的對話平台頁面，點選「串接對話平台」 <a href="#step-go-to-maiagent-channel-page" id="step-go-to-maiagent-channel-page"></a>

a. 點選右上角<mark style="color:blue;">串接對話平台</mark>

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

b. 選擇 Messenger

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

c. 登入該粉專的 Facebook 帳號。

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

### 2. 選擇商家，並選擇（認領）粉專。 <a href="#step-select-business-and-page" id="step-select-business-and-page"></a>

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

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

確定授權，建立成功後即完成託管。

<figure><img src="/files/6vS7sT4eD2ya0DBZtVBm" alt=""><figcaption></figcaption></figure>

### 3. AI 助理設定 <a href="#step-ai-agent-settings" id="step-ai-agent-settings"></a>

輸入對話平台名稱、 選擇 AI 助理及 Messenger 頻道(即為您剛剛認領的粉絲專頁)

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

### 4. 確認串接結果 <a href="#step-verify-integration" id="step-verify-integration"></a>

接著您可以在 MaiAgent 的內部對話試著針對該對話平台送出一個測試訊息，AI 助理如可以正常回覆對話，表示串接已成功。

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

您也可以到該粉專開啟 AI 助理對話，送出測試訊息，機器人如可以正常回覆對話，表示串接已成功。

<figure><img src="/files/T8eJAOL8FraIpPlWsraO" 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/conversations/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.
