上QQ阅读APP看书,第一时间看更新
Building your first bot
Chatfuel bots can be published on two deployment platforms: Facebook Messenger and Telegram. Let us build a chatbot for Facebook Messenger first. In order to do that, we need to create a Facebook Page. Every chatbot on Facebook Messenger needs to be attached to a page. Here is how we can build a Facebook Page:
- Go to https://www.facebook.com/pages/create/.
- Click the category appropriate to the page content. In our case, we will use Brand or Product and choose App Page.
- Give the page a name. In our case, let's use Get_Around_Edinburgh. Note that Facebook does not make it easy to change page names. So choose wisely.
- Once the page is created, you will see Chatfuel asking for permission to connect to the page:
- Click CONNECT TO PAGE. You will be taken to the bot editor.
- The name of the bot is set to My First Bot. It has a Messenger URL, which you can see by the side of the name. Messenger URLs start with m.me. You might notice that the bot also comes with a Welcome message that is built in. On the left, you see the main menu with a number of options, with the Build option selected by default. We will explore other options in later sections:
- Click the Messenger URL to start your first conversation with the bot. This will open Facebook Messenger in your browser tab:
- To start the conversation, click the Get Started button at the bottom of the chat window.
- There you go! Your conversation has just started. The bot has sent you a welcome message:
Notice how it greets you with your name. It is because you have given the bot access to your info on Facebook.
Now that you have built your first bot and had a conversation with it, give yourself a pat on your back. Welcome to the world of chatbots!