配置 Facebook
介绍
Facebook集成使您的客服人员能够直接从3CX回复您的Facebook页面消息,而无需登录Facebook Messenger。消息可以传送到呼叫队列、响铃组或单个分机。坐席可以获得消息的所有权或将其转移给另一个坐席或组。
需要一个 已验证 的Facebook 企业帐户。
第 1 步:创建 Facebook 应用程序
- 导航至 https://developers.facebook.com 并点击右上角的“Log In” 。
- 导航至“My Apps”。
- 点击 “Create App”。
- 选择选项“Other“ 然后点击 “Next”。
- 选择 “Business”。
- 为您的应用程序指定一个显示名称,输入联系电子邮件,然后使用下拉列表选择您的企业帐户。点击 “Create app”。
- 选择 “Messenger”进而 “Set up”。
- 下一个页面将让您将产品添加到您的应用程序中。向下滚动到“Messenger”并点击“Messenger API Settings”。
- 向下滚动到‘Access Tokens’部分,然后点击 “Connect”。
- 点击“Continue as (username)” ,然后使用复选框选择您想要集成的页面。
- 点击“Next”并完成接下来的确认消息。
- 您现在将看到您的 Facebook 页面列在‘Access Tokens’部分中。
- 点击“Generate token”。在弹出框中,勾选 ‘I Understand’框并将令牌复制到文本中,单击 “Done”。
- 最后,将Page ID(显示在页面名称下方)复制到文本。
第 2 步: 在3CX中配置
- 登录您的3CX网页客户端导航至“管理员” > “语音和聊天”并点击“添加Facebook”。
- 将默认名称编辑为您喜欢的名称。
- 如果您是一个“系统所有者”或“系统管理员”,您可以使集成在整个系统范围内或仅在某个部门中生效。
- 粘贴您在第1步中获取的‘页面 ID’和‘访问令牌’。
- 将 3CX Webhook 复制到文本并单击“Save”。
- 转到“用户”并创建一个临时测试用户,该用户将用于下面第4步中的应用程序审核过程。
- 确保消息路由已配置给您的新临时测试用户。有关这方面的更多信息,请查看 呼叫处理手册。
第 3 步:配置您的 Webhook
- 导航回开发者门户的‘Meta’。
- 返回应用程序 > 选择并编辑您的应用程序 > Messenger API Settings > 配置 Webhooks > 单击配置。
- 将 3CX 生成的 Webhook 粘贴到‘Callback URL’部分。
- 要验证令牌,请输入随机的字母和数字字符串。不再需要此操作,因此无需保存字符串以供日后使用。点击“Verify and save”。
- 点击 “Add subscriptions”从 ‘Generate Access Tokens’ 部分并选择以下复选框:
- messages
- message_deliveries
- messaging_pre_checkouts
- messaging_customer_information
- message_reads
- message_echoes
- 最后,点击 “Save”。
您的应用程序现已配置为与 3CX 配合使用,您可以尝试向您的 Facebook 页面发送消息。在此阶段,您的应用程序处于‘Development’模式,这意味着您只能与有权管理您的页面的用户进行交互。要切换到‘Live’模式,您需要请求额外权限并执行应用程序审核 - 详情如下。
第 4 步:申请审核
- 在您的 Meta for Developers 门户中,转到“App Settings” > “Basic”。向下滚动到页面底部,然后单击“+ Add platform”。
- 选择“Website”并点击“Next”。
- 输入 3CX Web客户端的 URL(例如 https://exampledomain.com/)并单击“Save changes”。
- 导航至 “App Review” > “Permissions and Features”。
- 搜索 ‘pages_messaging’ 并点击 “Request advanced access”。
注意:在此阶段,您可能需要在开发模式下发送或接收测试信息后等待长达24小时才能使用按钮。
- 现在搜索 ‘Business Asset User Profile Access’,然后再次单击“Request advanced access”。单击现已更改为 “Edit App review request”的按钮。
- 查看信息并向下滚动到‘Complete App Settings’。单击蓝色箭头。
- 为您的应用程序图标添加图像,提供隐私政策 URL 并使用下拉框将您的应用程序类别选择为 ‘Messaging’。点击 “Save”。
- 单击‘Complete App Verification’ 部分中的蓝色箭头。
- 在弹出框中勾选“No”并选中“My app doesn't use the Facebook Login dialog”和“Other”复选框。
- 将以下文本复制并粘贴到摘要框中,然后单击“Save”。
This Facebook App is used to integrate 3CX Phone System (https://3cx.com) with Facebook Messenger chats. Each 3CX customer has their own 3CX instance and will create their own App to integrate their Facebook Page. We need “pages_messaging” to receive and reply to messages started by a Facebook Page’s visitor. “Business Asset User Profile Access” is needed because it exposes the user's name and picture for identification of chat by agents. 3CX is using the name and picture attributes.
- 接下来,单击下一部分中标题为 ‘How will your app use the advanced access page_messaging permission?’里的蓝色箭头。
- 将以下文本复制并粘贴到第一个‘detailed description’框中。
This Facebook App is used to integrate 3CX Phone System (https://3cx.com) with Facebook Messenger chats. Each 3CX customer has their own 3CX instance and therefore will need to create their own App to integrate a Facebook Page. “pages_messaging” is required to receive and send messages started by a Facebook Page visitor.
- 在‘Test and reproduce the functionality of your integration’下面,使用下拉框选择您的 Facebook 页面。现在,使用在第二步结束时创建的临时测试用户的凭据编辑以下文本。
Step 1. Log in to the 3CX WebClient with the following credentials:
PBX Web client URL: https://exampledomain:5001/webclient
Extension: ________
Password: ________
Step 2. Write and send a test message on the Facebook Page.
Step 3. Receive and reply to the message in your 3CX Web Client.
- 现在,您必须录制一个屏幕录像,展示一条消息如何发送到您的 Facebook 页面,并被web客户端接收跟回复。有许多免费的屏幕录制选项可用,包括 Loom 和 Screenrec。
- 录制完成后,单击“Upload file”并选择您的截屏视频。
- 选中确认框并单击“Save”。
- 现在,单击标题为‘How will your app use the advanced access Business asset user profile access feature?’部分中的蓝色箭头。
- 将以下文本复制并粘贴到详细描述框中。
This Facebook App is used to integrate 3CX Phone System (https://3cx.com) with Facebook Messenger chats. Each 3CX customer has their own 3CX instance and will create their own App to integrate their Facebook Page. 3CX needs “Business Asset User Profile Access” because it exposes the user's name and picture for identification of chat users by agents. 3CX is using the name and picture attributes.
- 上传您之前录制的相同截屏视频,勾选确认框并单击“Save”。
- 点击 “Submit for Review”,输入您的 Facebook 密码进行验证,您将看到确认消息已成功提交。
- 最后,使用屏幕顶部的切换按钮将 ‘App Mode’ 从‘Development’更改为 ‘Live’。
当您的申请获得批准后,您将收到来自 Facebook 用户的消息。您应该确保删除为应用程序验证过程创建的临时测试用户,并将消息传递路由更新到所需的目的地。
另请参阅
最后更新
本文件最后更新于2023年12月4日