GithubHelp home page GithubHelp logo

app-chat-bot-workshop's Introduction

Paysera Chat Bot Workshop

Requirements

  • PHP >=5.5
  • composer
  • ngrok
  • Facebook Account

Setup instructions

PHP server

For simplicity of this task, we will use built-in PHP server.

  • install dependencies with composer install
  • from project's directory run in console php -S localhost:9999.
  • check local PHP server is running - in browser go to http://localhost:9999/ - you should see a blank page.

ngrok

Ngrok is local proxy allowing your PC to be accessible from Internet.

Facebook App Setup

  1. Chatbot will need a facebook page to work. Create page in facebook if you don't have one

  2. Go to Developer facebook.com and click Add new App

    1. Enter the name of your app (ex. Chatbot workshop)
  3. You will be redirected to you project configuration page

  4. Fill required steps:

    1. Get your App id and App secret
    2. Add messenger product to your application
    3. Select page that will use this app (may require to add permissions). Page Access Token will be generated. Add it to your application
    4. Click Subscribe To Events in Webhooks section
    5. Fill url you got from ngrok setup, other fields should be as it is in screenshot.
    6. Select a page to subscribe your webhook to the page events
  5. If everything was according to plan, you can open Messenger, search for chat bot and he should reply to you.

Changed ngrok hostname?

In case you restarted ngrok, you will receive a new public hostname, you need to change it in App Webhooks

app-chat-bot-workshop's People

Contributors

vbartusevicius avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.