Home / Companies / PubNub / Blog / Post Details
Content Deep Dive

Create a Chatbot in Under 10 Minutes Using Functions

Blog post from PubNub

Post Details
Company
Date Published
Author
Michael Carroll
Word Count
1,841
Language
English
Hacker News Points
-
Summary

This tutorial provides a step-by-step guide to creating a Facebook Messenger chatbot using Functions-as-a-Service from PubNub, highlighting how to build microservices and webhooks compatible with ECMAScript 6. It instructs users to modify Facebook's example code, create a Function for handling incoming messages, and set up a webhook via the PubNub network to interact with Facebook's API. The tutorial covers setting up a Facebook app, verifying tokens, obtaining a Page Access Token, and coding functions to receive and respond to messages. It also explores advanced features like sending structured messages and handling postbacks. Additionally, the tutorial emphasizes the scalability of Functions through PubNub’s real-time network, offering examples of potential implementations such as bots for weather alerts or neighborhood watch. The guide encourages further exploration of Functions and Endpoints documentation for extended learning and offers ideas for practical applications using PubNub’s infrastructure.