适用于聊天机器人的 Facebook Messenger 集成
关于此集成
Facebook Messenger 是我们最受欢迎的集成之一。它让开发者可以将聊天机器人直接连接到 Messenger,帮助企业在全球最常用的社交消息应用中实现对话自动化。
该集成基于官方 Messenger API 构建,确保消息传递可靠、快速,并获得 Meta 平台的全面支持。开发者只需拥有一个 Facebook 页面和 API 访问权限,即可开始连接聊天机器人。
设置完成后,Messenger 聊天机器人可以回答问题、发送更新、处理多媒体内容,并大规模支持客户服务。这使 Messenger 成为企业为客户提供即时沟通的实用渠道。
主要功能
- 自动化客户对话
- 发送即时回复
- 支持图片、视频和文件
- 利用聊天机器人数据个性化消息
- 大规模处理双向消息
- 集成 Facebook 页面收件箱
- 通过 Messenger 事件触发工作流
- 提供实时客户支持
常见问题
如何将聊天机器人连接到 Facebook Messenger?
要将聊天机器人连接到 Facebook Messenger,需通过 Messenger API 将 Facebook 页面与您的聊天机器人平台关联。这需要验证您的 Facebook 账号,并选择机器人将要服务的页面。
设置 Messenger 聊天机器人前需要准备什么?
在设置 Messenger 聊天机器人前,您需要一个已发布的 Facebook 页面、一个 Meta 开发者账号,以及支持 Messenger 集成的聊天机器人平台。
部署 Messenger 机器人需要 Facebook 应用审核或批准吗?
如果您的 Messenger 机器人需要使用广播或持久菜单等高级功能,则需要通过 Facebook 应用审核。如果机器人仅在 24 小时内回复用户消息,则无需审核。
Messenger 聊天机器人可以处理图片、视频和文件吗?
Messenger 聊天机器人可以发送和接收文本、图片、GIF、视频、音频消息和文件附件。
如何在上线前测试我的 Messenger 聊天机器人?
在上线前,您可以让 Facebook 页面管理员或编辑与机器人进行私密对话来测试 Messenger 聊天机器人。
在 Facebook Messenger 上发送消息有费用吗?
在 Facebook Messenger 上发送消息无需费用。企业可在用户最后一次互动后的 24 小时内免费发送消息,超出该时间窗口,仅允许发送一次性通知或赞助消息等经批准的消息类型。
<iframe src="https://www.youtube.com/embed/pOIrLMpZZqc"></iframe>
The Facebook and Messenger integration empowers your chatbot to seamlessly interact across Facebook's messaging ecosystem, combining both Messenger and Facebook Page capabilities into one powerful solution. Connect your AI-powered chatbot to engage with your audience through multiple touchpoints: respond to direct messages, reply to comments on Facebook Page posts, and even initiate private conversations directly from post comments.
## Configuration (Updates)
### Manual configuration
#### Webhook Subscriptions
Using the Messenger App in your Meta app, subscribe to the following fields:
- **messages**: Required to receive incoming direct messages
- **messaging_postbacks**: Required to handle button clicks and quick replies
- **(NEW) feed**: Required to receive and respond to comments on Facebook page posts. This field is essential for the comment interaction features and proactive conversation from comments.
## Proactive Conversations
The integration now supports proactive conversation creation, letting you seamlessly move from public interactions to private DMs. When someone comments on a post from your Facebook Page, you can use that comment’s ID to automatically initiate a private conversation with the user.
## Migrating from 4.x to 5.x
### Reauthorization for comment replies
If your bot was previously connected to your Facebook page using OAuth, you will need to complete the authorization flow again in order to receive messages on the `commentReplies` channel.
### Changes to the 'Get Or Create Conversation' card
The following changes have been implemented:
- Renaming of the `id` parameter to `userId`. The ID still corresponds to the Messenger ID of the user that is or will be taking part in the conversation.
- It is now the responsibility of the Bot developer to ensure the validity of the provided user ID. No additional checks are made in the action.
### Removal of `recipientId` and `senderId` conversation tags
The `recipientId` and `senderId` conversation tags were removed because of their redundancy. The recipient ID, which corresponded to the Bot's Messenger ID, can still be found in the `recipientId` message tag of incoming messages or in the `senderId` message tag of outgoing messages. The sender ID, which corresponded to the user's Messenger ID, can still be found in the `id` conversation tag.
### Markdown message type
The Markdown message type has been deprecated, so its support has been removed in the `channel` channel. You can use the text message type to send Markdown instead.
## Migrating from 3.x to 4.x
### _postback_ and _say_ messages prefix
In version 4.0 of Messenger, _postback_ and _say_ messages no longer use the prefixes `postback:` or `say:`. If your bot relied on these prefixes for logic or transitions, you can update it to depend solely on the value set for the postback.