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 availability24/7可用
  • 100% answers100%的答案
  • 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机器学习

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

  1. 手机facebook注销_如何在Android设备上注销Facebook Messenger

    手机facebook注销 Ever since Facebook decided to force people to use Facebook Messenger to send and recei ...

  2. pytorch机器学习_机器学习— PyTorch

    pytorch机器学习 PyTorch : It is an open source machine learning library based on the Torch library (whic ...

  3. twitter验证_社交网络身份验证:Twitter和Facebook

    twitter验证 In the previous parts of this series, we created our initial interfaces, set up our Google ...

  4. Python_机器学习_算法_第1章_K-近邻算法

    Python_机器学习_算法_第1章_K-近邻算法 文章目录 Python_机器学习_算法_第1章_K-近邻算法 K-近邻算法 学习目标 1.1 K-近邻算法简介 学习目标 1 什么是K-近邻算法 1 ...

  5. python 读grid 数据_科学网—Python_机器学习_总结14:Grid search - 李军的博文

    机器学习中存在两类参数:通过训练数据学习得到的参数:---可认为是辨识得到的参数,例如模型系数: 在学习算法中单独需要优化的参数--超参.调优参数:---算法自身的系数,例如决策树的深度参数: Gri ...

  6. FaceBook机器学习开源DL模块

    据GIGAOM报道,近日,Facebook人工智能研究院(FAIR)开源了一系列软件库,以帮助开发者建立更大.更快 的深度学习模型.开放的软件库在Facebook被称作模块.用它们替代机器学习领域常用 ...

  7. 端到端机器学习_端到端机器学习项目:评论分类

    端到端机器学习 In this article, we will go through a classification problem that involves classifying a rev ...

  8. facebook 面试_如何为您的Facebook产品设计面试做准备

    facebook 面试 重点 (Top highlight) Last month, I joined Facebook to work on Instagram DMs and as a way t ...

  9. node oauth2验证_如何设置和使用护照OAuth Facebook身份验证(第2部分)| Node.js

    node oauth2验证 In my last article (How to set up and use passport OAuth Facebook Authentication (Sect ...

最新文章

  1. JAVA中的Font
  2. mysql function使用
  3. FuncT,TResult的使用方法(转载)
  4. 《通过Web远程浏览并控制Tiny6410上的usb摄像头》---实战篇
  5. 路飞学城Python-Day182
  6. 【CodeForces - 289D】Polo the Penguin and Houses (带标号的无根树,Cayley定理,Prufer编码)
  7. java拼三级魔方_魔方秘籍(详细解法)《三阶》
  8. synchronized底层是如何实现的?
  9. php7.1安装mysqli扩展,centos php7 安装mysqli扩展心得
  10. php是单线程吗,php语言是单线程吗?
  11. [Ext JS 4] Extjs 图表 Legend(图例)的分行与分列显示
  12. Python结合Tableau,万字长文搞定传统线下连锁店数据分析
  13. Windows控制台cmd默认代码页修改的办法【GBK、UTF-8】
  14. 为什么古代皇帝总是治不了腐败?因为拿得越多、越安全
  15. Tensorflow学习笔记 (用 tf.data 加载图片)
  16. matlab方差分析加代码和结果分析
  17. C语言 字符‘0‘和‘\0‘ 以及整数0的区别
  18. 水管工游戏(代码附带注释)2020.10.6
  19. 车载网络基础——预备篇
  20. nginx 配置优化的几个参数

热门文章

  1. c++如何防止一个类被其他类继承?
  2. java将字节数组转换成字符串,面试心得体会
  3. DirectXInput
  4. IRasterStatistics Interface
  5. 上周热点回顾(6.14-6.20)
  6. TGE学习笔记07 - 脚本控制动画
  7. java并发synchronized 锁的膨胀过程(锁的升级过程)深入剖析(1)
  8. 同步阻塞的BIO、同步非阻塞的NIO、异步非阻塞的AIO
  9. VS2005 ASP.NET2.0安装项目的制作(包括数据库创建、站点创建、IIS属性修改、Web.Config文件修改)
  10. 数据结构05数组和广义表