At the end of this course, you will be able to create your own keyword based chatbots for Facebook Messenger!
Since Facebook Messenger opened their platform for chatbots, many people believe these conversational bots are among the next big things to change how people interact with technology. But how do you build a chatbot? Welcome to Chatbot Academy.
Together, we will build a chatbot called "Twitter Trending Chatbot" that returns currently trending topics for a location the user wants. We will do this step by step with a PHP framework called Laravel, which makes it very easy to prototype and develop your first bot.
In this hands-on course, you will learn:
This course is designed for:
Topics that are not part of this course (yet):
Are you ready to build your first bot?
Then sign up now and join Chatbot Academy. It's a lot of fun, we promise :).
Emoji provided free by.
Let's get started! In this lecture, you will learn more about the course content, and how we're going to build a chatbot for Facebook Messenger step by step.
We are going to use Laravel, a great framework for PHP, to create our chatbot. In this lecture, you will briefly learn what Laravel is about and how to install it.
Chatbots are hyped! But why, and what can they do? In this lecture, you will learn some basics about chatbots and why they're so interesting at the moment.
Enough with the theory! After this lecture, we're getting our hands dirty. Let's build a bot together.
In this section, we're going to build our first chatbot for Facebook Messenger. It will just respond with a simple "Hello World" after a conversation is initiated by a user. But it's something!
To get started, we first need to create a new Laravel project on your computer. Make sure that you have installed Laravel and Composer to be able to complete this task.
ngrok is a very helpful tool to make your local files accessible to the outside. We will use this later to communicate with the Facebook API without having to upload our files to a server all the time.
To communicate with the Facebook Messenger API, we're going to use a PHP package by Pimax. In this lecture, you will learn how to use this package in Laravel.
In order to communicate with the Facebook API, we first need to create a Facebook page and app. Let's do this in this lecture.
In this lecture, you will learn how to verify the webhook with the Facebook Messenger API. We will create a MessengerController in our Laravel project and write the necessary code to pass the verification.
Before we send out our first message to a user, we first need to be able to receive messages via the Facebook Messenger API. This is necessary because the first interaction between a user and a page always needs to be initiated by the user. In this lecture, we're creating a POST webhook and looking at incoming messages.
Finally! In this lecture, we're sending out our first message "Hello World" to a user.
The groundwork is done, now we can proceed to the fun part. In the next section, we are going to create the core functionality of the bot: Communicating with the Twitter API.
A little fun exercise: What if we don't want our bot to respond with "Hello World," but rather just copy the user's messages? Let's try it out!
In this section, you will learn how to respond to keywords, communicate with the Twitter Trends API, and return trends for any location the user wants.
In this lecture, we're making our bot a lot better. Let's bury the "parrot bot" and start making it able to respond to (extendable) commands. After this lecture, you will have a blueprint for a simple, keyword-based chatbot.
To be able to build the core functionality of the bot, we first need to be able to communicate with the Twitter API. In this lecture, you will learn how to install a Twitter API package for Laravel to do exactly that.
Almost there! Let's start with Berlin. In this lecture, you will learn how to return currently trending Twitter topics for Berlin in a simple text message.
Finally! In this lecture you will learn how to return trending topics for any location, not only Berlin. This is a great example for a simple keyword and rules-based chatbot.
In this lecture, you will learn how to get the name of a location with the right use of capital and small letters.
Congratulations! You just built your first prototype of a keyword-base chatbot!
In this lecture, you will learn more about the necessary steps to publish your chatbot.
To make our bot publicly available, we need to move away from our localhost + ngrok and upload our code to a server. We will use this by deploying our project to Heroku.
Facebook has a review process that Messenger bots need to pass, before they are accessible to any Facebook user. In this lecture, you will learn more about the review steps.
That was it! Any questions? Please let me know in the forum. Happy to help!
Our goal at Chatbot Academy is to help as many people as possible to develop great conversational products and chatbots. We believe that voice and text as user interfaces are becoming more important, as we can see with emerging platforms like Facebook Messenger and Amazon Alexa.
My name is Jan, and I co-founded Chatbot Academy together with my friend Alex Swetlow. I have more than 5 years experience in product management and product marketing, and previously founded HashtagNow, a social news startup. I studied Industrial Engineering and Management at the Karlsruhe Institute of Technology (KIT) and UMass Amherst, and lived and worked in New York City and Berlin.
I love exploring new opportunities at the intersection of technology, design, and psychology. If you're as excited about this space as I am, please reach out or join one of the courses below. See you soon! :)