facebook机器学习_如何为您的页面创建Facebook Messenger机器人

facebook机器学习

by Paul Pinard

保罗·皮纳德(Paul Pinard)

如何为您的页面创建Facebook Messenger机器人 (How to create a Facebook messenger bot for your page)

When it comes to sharing your chatbot, Facebook Messenger is a must. We created a very easy step-by-step integration process for our platform users. Let’s dive in!

共享您的聊天机器人时,必须使用Facebook Messenger。 我们为平台用户创建了一个非常简单的逐步集成过程。 让我们潜入吧!

In fact, we realized many companies immediately put their bots on Facebook once in production, as it’s clearly the most user-friendly and easiest way for a customer to contact a company.

实际上,我们意识到许多公司在生产后立即将他们的机器人放到Facebook上,因为这显然是客户与公司联系的最用户友好和最简单的方式。

A Facebook chatbot has a lot of advantages:

Facebook聊天机器人具有很多优点:

  • 24/7 availability

    24/7可用
  • 100% answers

    100%的答案
  • Instant answers (think about your Answer rate!)

    即时答案(考虑您的答案率 !)

  • Tedious tasks are automated

    繁琐的任务是自动化的

On the SAP Conversational AI platform, we created a step-by-step integration process for our users, so that it only takes a few minutes to reveal your chatbot to your Facebook followers. Let’s dive in!

在SAP Conversational AI平台上,我们为用户创建了逐步的集成过程,因此只需几分钟便可以向您的Facebook粉丝显示您的聊天机器人。 让我们潜入吧!

第1步:准备好聊天机器人 (Step 1: Get your chatbot ready)

First of all, you’ll need a chatbot (seems legit, right?!). Note that once your chatbot is online on Facebook, you’ll be able to modify it, and any changes you make to it will appear in your Messenger chat.

首先,您将需要一个聊天机器人(似乎合法,对吧?!)。 请注意,一旦聊天机器人在Facebook上在线,您就可以对其进行修改,并且您对它所做的任何更改都将显示在Messenger聊天中。

For the purpose of this tutorial, we won’t go into how to create a chatbot. Instead, I warmly invite you to create your account (it’s completely free!) and read our tutorial.

就本教程而言,我们将不介绍如何创建聊天机器人。 相反,我热烈邀请您创建您的帐户 (它完全免费!)并阅读我们的教程 。

Once your “joke-telling chatbot” (or whatever you’ve built) is ready, return here!

一旦您的“讲笑话的聊天机器人”(或您所构建的任何东西)准备就绪,请回到这里!

步骤2:准备好您的Facebook页面 (Step 2: Get your Facebook page ready)

Your chatbot will only be available for integration on a Facebook page (not on your personal profile). This means you have to create a Facebook page or have in mind the one you’ll use. Let’s assume your company, business, or group already has a page. (If that’s not the case, hit this link and create one.)

您的聊天机器人只能在Facebook页面 (而不是您的个人资料)上集成。 这意味着您必须创建一个Facebook页面,或者记住要使用的页面。 假设您的公司,企业或组已经有一个页面。 (如果不是这种情况,请点击此链接并创建一个。)

As I said in the introduction, having a chatbot on a Facebook page will automate private messaging once it’s connected to your page. Thus, if you decide to remove the chatbot, you’ll immediately revert to traditional person-to-person conversations (which means nothing will happen when users enter a message until you manually answer them).

就像我在简介中所说的那样,在Facebook页面上建立聊天机器人后,私人信息就会自动连接到您的页面。 因此,如果您决定删除聊天机器人,您将立即恢复为传统的人对人对话(这意味着当用户输入消息之前,除非您手动回答,否则什么也不会发生)。

步骤3:建立Messenger Messenger应用程式 (Step 3: Create a Messenger Facebook app)

Creating an app will help make the connection between SAP Conversational AI and your Facebook page. Without this app, you won’t be able to publish your chatbot on your Facebook page.

创建一个应用程序将有助于使SAP Conversational AI与您的Facebook页面之间建立连接 。 没有该应用程序,您将无法在您的Facebook页面上发布聊天机器人。

Click on this link, choose My Apps in the top menu and then Add New App.

点击此链接,在顶部菜单中选择我的应用程序 ,然后选择添加新应用程序

Once your app is created, you’ll have to add a Messenger “product”.

创建应用程序后,您必须添加Messenger“产品”。

There are tons of jobs a Facebook app can be dedicated to, but we specifically want a private messaging application. Go to your app’s dashboard and click Set Up in the Messenger box.

Facebook应用程序可以完成很多工作,但是我们特别希望使用私人消息传递应用程序。 转到应用的信息中心,然后在Messenger框中单击“ 设置”

In the left-hand menu, you’ll then see Messenger under PRODUCTS.

在左侧菜单中,您将在PRODUCTS下方看到Messenger

第4步:获取页面令牌和应用程序密码 (Step 4: Get your page token and app secret)

Now that we’ve created a Messenger app, we need to link it to your Facebook page (by default, a Facebook app is an independent entity). With this connection, you’ll be given a token, which is basically a unique code that says “OK, this is the code of the Messenger app of the page X”.

现在我们已经创建了Messenger应用,我们需要将其链接到您的Facebook页面(默认情况下,Facebook应用是一个独立的实体)。 有了这个连接,您将获得一个令牌,该令牌基本上是一个唯一的代码,上面写着“确定,这是X页面的Messenger应用程序的代码”。

In the left-hand menu, click Settings just below the product Messenger.

在左侧菜单中,点击产品Messenger下方的设置

Choose the page you want your chatbot to appear on.

选择您希望聊天机器人出现的页面。

For security reasons, you’ll probably need to allow the app to interact with your Facebook page. Click the blue Edit Permissions button, select your page, and check the different boxes.

出于安全原因,您可能需要允许该应用与您的Facebook页面进行交互。 单击蓝色的“ 编辑权限”按钮,选择页面,然后选中不同的框。

Once the permissions are given, a token will be generated.

授予权限后,将生成令牌。

Go back to the Connect tab in your SAP Conversational AI chatbot, choose Messenger, and paste your token in the Page token field in step 4.

返回到SAP Conversational AI聊天机器人中的“ 连接”选项卡,选择“ 信使” ,然后在步骤4中将您的令牌粘贴到“ 页面令牌”字段中。

Yay, we’re halfway through! Let’s now get our “app secret”, which is like a password for your app.

是的,我们已经过了一半! 现在,让我们获取“应用程序密码”,就像您应用程序的密码一样。

In the left-hand menu, go to Settings > Basic.

在左侧菜单中,转到“设置> 基本

For privacy, the app secret is hidden. Click Show and copy and paste it to the App secret field on your chatbot’s Connect tab (similar to what you just did with the page token).

为了保护隐私,应用程序的秘密被隐藏了。 单击显示并将其复制并粘贴到聊天机器人的“ 连接”选项卡上的“ 应用程序秘密”字段中(类似于您对页面令牌所做的操作)。

Click Update channel under the SAP Conversational AI form.

单击SAP Conversational AI表单下的Update channel

步骤5:将SAP Conversational AI连接到您的应用程序 (Step 5: Connect SAP Conversational AI to your app)

It’s time to connect our platform to Messenger!

现在是时候将我们的平台连接到Messenger了!

On the Products > Messenger > Settings page, go to the Webhooks section and click Subscribe To Events.

产品和克叔; 在Messen ger >“设置”页面上,转到“我们的下注”部分, 然后单击“订阅事件”。

In the pop-up window, enter the values for Callback URL and Verify token that you’ll find in step 4 of your chatbot’s Connect tab.

在弹出窗口中,输入在聊天机器人的“ 连接”选项卡的第4步中将找到的“ 回调URL”和“ 验证令牌”的值。

Also select the checkboxes shown below:

还要选择下面显示的复选框:

Once your page has reloaded, select your page in the list so that it can access your webhook.

页面重新加载后,在列表中选择页面,以便它可以访问您的Webhook。

步骤6:测试并发布Messenger Chatbot (Step 6: Test and publish the Messenger Chatbot)

Now you can test your bot as an administrator (you can also grant some test roles using Roles > Test Usersin the left-hand menu). Your bot won’t be publicly accessible until you change the status, so take your time to test it and make sure everything is just fine before releasing it to the world!

现在您可以以管理员身份测试您的漫游器 (也可以使用左侧菜单中的Roles &g t; Test Uss来授予某些测试角色)。 在您更改状态之前,您的机器人将无法公开访问, 因此请对您的机器人进行测试,并确保在发布之前,一切正常!

Once you’re happy with your bot, if you change the toggle to ON (in the top right corner), you’ll be redirected to the settings and prompted to provide some extra information before your bot is published. (Tip: You can also access the settings under Settings > Basic in the left-hand menu.)

对机器人感到满意后,如果将切换开关更改为ON (在右上角),则会将您重定向到设置,并提示您提供一些其他信息,然后再发布您的机器人。 (提示:也可以访问下设置 &克设置;基本在左手菜单)。

Very last step: Facebook will want to verify and test your Messenger chatbot. Here’s what they say about this step in their documentation:

最后一步:Facebook将要验证和测试您的Messenger聊天机器人。 他们在文档中对这一步骤的评价如下:

When you are ready to release your bot to the public, you must submit it to our team for review and approval. This review process allows us to ensure your Messenger bot abides by our policies and functions as expected before it is made available to everyone on Messenger.” — Facebook Documentation

当您准备将机器人发布给公众时,必须将其提交给我们的团队进行审查和批准。 通过此审核过程,我们可以确保您的Messenger机器人在将其提供给Messenger上的所有人之前都遵守我们的政策和功能。 ” — Facebook文档

In the left-hand menu, go to Products > Messenger > Settings and click Add to Submission in the pages_messaging block.

在左侧菜单中,转到产品 &g t; 单击 Messen ger >设置然后 在pages_mes saging块中单击Add to Submsion

It won’t take long for the Facebook review team to look at your bot and give you the green light to publish it!

Facebook审核团队很快就可以看到您的机器人,并为您发布该机器人开了绿灯!

And that’s all there is to it!

这就是全部!

Hope you enjoyed this tutorial. And remember you’re very welcome to contact us if you need help, through the comment section below or via Stack Overflow.

希望您喜欢本教程。 并且请记住,如果需要帮助,请通过下面的评论部分或通过Stack Overflow与我们联系。

Happy bot building ?

快乐的机器人大厦?

翻译自: https://www.freecodecamp.org/news/how-to-create-a-facebook-messenger-bot-for-your-page-3be12ca18de5/

facebook机器学习

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/391775.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Logstash配置语法及相关命令

配置结构以及插件位置 输入插件: input{ … } 过滤插件: filter{ … } 输出插件: output{ … } 数据类型 - Array users > [{id > 1,name > N1},{id > 2,name > N2}] - lists path > ["/var/log/messages"…

面试整理

SpringMVC 和Struts2的区别 1. 机制: spring mvc的入口是servlet,而struts2是filter,这样就导致了二者的机制不同。 2. 性能: spring会稍微比struts快。spring mvc是基于方法的设计,而sturts 是基于类,…

Amazon Personalize:帮助释放精益数字业务的高级推荐解决方案的功能

By Gerd Wittchen盖德维琴 推荐解决方案的动机 (Motivation for recommendation solutions) Rapid changes in customer behaviour requires businesses to adapt at an ever increasing pace. The recent changes to our work and personal life has forced entire nations t…

Linux 链接文件讲解

链接文件是Linux文件系统的一个优势。如需要在系统上维护同一文件的两份或者多份副本,除了保存多份单独的物理文件之外,可以采用保留一份物理文件副本和多个虚拟副本的方式,这种虚拟的副本就成为链接。链接是目录中指向文件真实位置的占位符。…

系统滚动条实现的NUD控件Unusable版

昨天研究了一下系统滚动条,准备使用它来实现一个NumericUpDown控件,因为它可以带来最正宗的微调按钮外观,并说了一下可以使用viewport里的onScroll事件来获取系统滚动条的上下点击动作。 同时昨天还说了onScroll事件的一个问题是&#xf…

react 中渲染html_如何在React中识别和解决浪费的渲染

react 中渲染htmlby Nayeem Reza通过Nayeem Reza 如何在React中识别和解决浪费的渲染 (How to identify and resolve wasted renders in React) So, recently I was thinking about performance profiling of a react app that I was working on, and suddenly thought to set…

php变量的数据类型

一、类型 标量类型: 布尔型 整型 浮点型 字符串 复合类型: 数组 对象 特殊类型: 资源 null 1. 布尔型 true false 以下值认为是false 其他值都认为是true; 布尔值false 整型值0 浮点的0 空字符串和字符串0 空数组 空对象(只适用于php4) 特殊类型null 2. 整型 正整数和负整…

[习题].FindControl()方法 与 PlaceHolder控件 #2(动态加入「子控件」的事件)

这是我的文章备份,有空请到我的网站走走, http://www.dotblogs.com.tw/mis2000lab/ 才能掌握我提供的第一手信息,谢谢您。 http://www.dotblogs.com.tw/mis2000lab/archive/2011/07/26/placeholder_findcontrol_eventhandler.aspx [习题].Fi…

西雅图治安_数据科学家对西雅图住宿业务的分析

西雅图治安介绍 (Introduction) Airbnb provides an online platform for hosts to accommodate guests with short-term lodging. Guests can search for lodging using filters such as lodging type, dates, location, and price, and can search for specific types of hom…

leetcode 1438. 绝对差不超过限制的最长连续子数组(滑动窗口+treemap)

给你一个整数数组 nums ,和一个表示限制的整数 limit,请你返回最长连续子数组的长度,该子数组中的任意两个元素之间的绝对差必须小于或者等于 limit 。 如果不存在满足条件的子数组,则返回 0 。 示例 1: 输入&#…

react-redux图解_如何将React连接到Redux —图解指南

react-redux图解by Princiya由Princiya 如何将React连接到Redux —图解指南 (How to connect React to Redux — a diagrammatic guide) This post is aimed at people who already know React and Redux. This will aid them in better understanding how things work under …

几种机器学习算法的优缺点

1决策树(Decision Trees)的优缺点 决策树的优点: 一、 决策树易于理解和解释.人们在通过解释后都有能力去理解决策树所表达的意义。 二、 对于决策树,数据的准备往往是简单或者是不必要的.不需要预处理数据。…

【贪心】买卖股票的最佳时机含手续费

/** 贪心:每次选取更低的价格买入,遇到高于买入的价格就出售(此时不一定是最大收益)。* 使用buy表示买入股票的价格和手续费的和。遍历数组,如果后面的股票价格加上手续费* 小于buy,说明有更低的买入价格更新buy。如…

本科毕设论文——基于Kinect的拖拉机防撞系统

基于Kinect的拖拉机防撞系统电子信息科学与技术专业学生 sukeysun 摘要:随着智能车辆技术的发展,智能导航定位和实时车载监控等技术被更多的应用到日常生活照。在农业领域上,车辆自主感知道路环境并制定实时避障策略还存在不足,特…

排序算法Java代码实现(二)—— 冒泡排序

本篇内容: 冒泡排序冒泡排序 算法思想: 冒泡排序的原理是:从左到右,相邻元素进行比较。 每次比较一轮,就会找到序列中最大的一个或最小的一个。这个数就会从序列的最右边冒出来。 代码实现: /*** */ packag…

创意产品 分析_使用联合分析来发展创意

创意产品 分析Advertising finds itself in a tenacious spot these days serving two masters: creativity and data.如今,广告业处于一个顽强的位置,服务于两个大师:创造力和数据。 On the one hand, it values creativity; and it’s not…

leetcode 剑指 Offer 05. 替换空格

请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 示例 1: 输入:s “We are happy.” 输出:“We%20are%20happy.” 解题思路 一次遍历,检查空格,然后替换 代码 class Solution {publ…

两个富翁打赌_打赌您无法解决这个Google面试问题。

两个富翁打赌by Kevin Ghadyani通过凯文加迪亚尼(Kevin Ghadyani) 打赌您无法解决这个Google面试问题。 (Bet you can’t solve this Google interview question.) 将棘手的问题分解为小块。 (Breaking tough problems into small pieces.) I wanted to see someone else’s t…

vue.js 安装

写 一个小小的安装步骤 踩坑过来的 点击.然后安装cnpm.再接着使用文章说明继续安装 # 全局安装 vue-cli $ cnpm install --global vue-cli # 创建一个基于 webpack 模板的新项目 $ vue init webpack my-project这时候一路空格 选项.当遇到第一个让你敲 Y/N 的时候 选择Y …

Swift 的函数和闭包

函数的关键字是 func ,函数定义的格式是: func funcName(para:paraType) -> returnType{// code } 复制代码函数的参数标签 其中参数的那部分的详细结构是用小括号括起来,参数名,冒号,参数类型: (number…