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.pswp.cn/news/391775.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/391775.shtml
英文地址,請注明出處:http://en.pswp.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…