Skip to content

Chheung/botman-demo

Repository files navigation

BotMan Studio

About BotMan Studio

While BotMan itself is framework agnostic, BotMan is also available as a bundle with the great Laravel PHP framework. This bundled version is called BotMan Studio and makes your chatbot development experience even better. By providing testing tools, an out of the box web driver implementation and additional tools like an enhanced CLI with driver installation, class generation and configuration support, it speeds up the development significantly.

Documentation

You can find the BotMan and BotMan Studio documentation at http://botman.io.

Setup and serve the app

  • Install the app composer install
  • Serve the app php artisan serve

Database schema

  • Create your schema by php artisan mysql:createdb botman_db
  • Migrate the tables by php artisan migrate
  • Seed the datas by php artisan db:seed
  • Reset database ( will required to seed again ) php artisan migrate:fresh

Integrate with Facebook messenger

  • Install Facebook driver ( check the doc )
  • Add the following:
    • FACEBOOK_TOKEN=your-facebook-page-token
    • FACEBOOK_VERIFICATION=your-facebook-verification-token
    • FACEBOOK_APP_SECRET=your-facebook-app-secret
    • Official guideline here to test out => https://developers.facebook.com/docs/messenger-platform/getting-started/quick-start
  • To be able to integrate you'll need HTTPs protocol. For this u can use ngrok to host your localhost.
  • FACEBOOK_VERIFICATION is what you added by yourself to verify your connection between facebook and your app. ( you can put anything u want. but when you add the webhook they are needed to be matched. ).
  • After hosing ur localhost by ngrok u should be able to add ur webhook in facebook developer dashboard page. example: {ur https ngrok}/botman
  • FACEBOOK_TOKEN is retrieved by token generation after adding your webhook in Messenger product (located in develop facebook dashboard sidebar)
  • FACEBOOK_APP_SECRET is retrieved by Dashboard => Setting => Basic.
  • Test your connection out with postman. `E.g: https://{your ngrok or your site }/botman?hub.verify_token={your manual token in env}&hub.challenge=CHALLENGE_ACCEPTED&hub.mode=subscribe
  • Restart your app once you successfully connected to the facebook.

For botman facebook guideline and UI please check https://botman.io/2.0/driver-facebook-messenger

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published