Sunday, October 28, 2018

How to setup Facebook ChatBot (2) ?



Note: Facebook has provided a very details step by step guide. This is for my own note taking and reference

Based on the previous tutorial, we know the steps and configuration that we need to perform to create Facebook Chatbot. However, it still lack of human intelligent to interact with human being.

In order to enable the Facebook chatbot to understand your question and respond intelligently, a backend system with machine learning and natural language processing (NLP) is required. We have selected DialogFlow as the platform which powered by Google, as the platform to allow us to explore the Chatbot and AI technology.

Prerequisite
- Register an account at DialogFlow


Create the DialogFlow Agent


- Click on the dropdown menu at the left menu, select create new agent menu. Fill in the information


- Fill in the information as listed below:
  • Agent Name - A name to identified the agent
  • Default Language - I used English
  • Default time zone - Depends on your location
- Click on "Create" button, agent will be created.  A google project will be created as well.

- Select "Small Talk" at the menu, check enable checkbox. 


- Click on "Integrations" at the left menu to launch the "Integration" listing


- Click on "Facebook Messenger", enter the token from Facebook messenger into the "Verify Token" and "Page Access Token" fields. Copy the "Callback URL" and paste it into Facebook messenger.


- Login to Facebook developer console, click on "Webhooks" at the left menu, click on "Edit Subscription" button. Paste the url from "Dialog flow" and paste into "Callback URL" field.


- Now, the Facebook messenger able to answer the simple question. Please refer to the screenshot below.


No comments: