Create a Chatbot for Facebook Messenger with Laravel and PHP
4.5 (32 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
147 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Create a Chatbot for Facebook Messenger with Laravel and PHP to your Wishlist.

Add to Wishlist

Create a Chatbot for Facebook Messenger with Laravel and PHP

Step by step to your first custom chatbot with PHP
4.5 (32 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
147 students enrolled
Created by Jan König
Last updated 2/2017
English
Curiosity Sale
Current price: $10 Original price: $35 Discount: 71% off
30-Day Money-Back Guarantee
Includes:
  • 1.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Develop your own keyword-based chatbots for Facebook Messenger
  • Use Laravel to your advantage to create chatbots quickly
  • Use PHP to communicate with the Twitter REST API
View Curriculum
Requirements
  • You should be able to understand and write simple PHP code
  • You should have a text editor like Sublime Text 2 and a working version of PHP on your computer
  • You should understand the principles of Model View Controller frameworks like Laravel
Description

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:

  • How to use Laravel for PHP to create a new chatbot project
  • How to create a Facebook app and receive messages
  • How to send messages based on a user's input
  • How to respond to keywords with real-time data
  • How to upload and publish your bot

This course is designed for:

  • Developers and marketers with some experience with PHP
  • People who have heard of MVC frameworks like Laravel before
  • People who are excited about learning something new :)

Topics that are not part of this course (yet):

  • Natural Language Processing (for beginners, keyword based solutions are enough to play with)
  • Artificial Intelligence (we are going to create a rules based chatbot)
  • Other platforms like Kik, Telegram, or Slack

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 EmojiOne.

Who is the target audience?
  • This course is for developers and marketers who want to learn how to create simple chatbots
Students Who Viewed This Course Also Viewed
Curriculum For This Course
25 Lectures
01:40:41
+
Introduction
4 Lectures 08:59

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.

Preview 03:08

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.

Introduction to Laravel
02:01

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.

Preview 03:07

Enough with the theory! After this lecture, we're getting our hands dirty. Let's build a bot together.

Summary
00:43
+
Your first bot: "Hello World"
10 Lectures 40:07

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!

Introduction
00:40

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.

Create a new Laravel project
02:47

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.

Preview 04:38

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.

Use the Messenger API Package for PHP
03:28

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.

Create a Facebook app
04:40

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.

Preview 10:33

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.

Receive messages from Facebook users
06:22

Finally! In this lecture, we're sending out our first message "Hello World" to a user.

Preview 03:48

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.

Summary
00:57

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!

Bonus: Create a parrot bot
02:14
+
Build your bot with real-time data
7 Lectures 38:12

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.

Introduction
00:48

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.

Preview 09:27

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.

Get real-time data from Twitter
09:30

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.

Return Twitter trends for Berlin
04:24

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.

Return Twitter trends for any location
10:37

In this lecture, you will learn how to get the name of a location with the right use of capital and small letters.

A simple fix for better readability
02:18

Congratulations! You just built your first prototype of a keyword-base chatbot!

Summary
01:08
+
Publish your bot
4 Lectures 13:23

In this lecture, you will learn more about the necessary steps to publish your chatbot.

Introduction
00:50

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.

Upload your project to Heroku
08:15

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.

Prepare for the Facebook Messenger review
03:10

That was it! Any questions? Please let me know in the forum. Happy to help!

Summary
01:08
About the Instructor
Jan König
4.5 Average rating
32 Reviews
147 Students
1 Course
Co-founder at Chatbot Academy

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! :)