Skip to content

Instantly share code, notes, and snippets.

# To build a prod version of the app, then just need to run:
ionic build --prod && npm run postbuild

Creating your own Facebook Messenger Bot with Backand

Facebook recently opened up their Messenger platform to enable bots to converse with users through Facebook Apps and on Facebook Pages. In support of this, the Facebook Messenger team created a comprehensive set of documentation describing the functionality on offer. While they offer a lot of functionality and platform-level integration for free, you still need to create a publicly-accessible application that Facebook can communicate with in order to communicate with your end users.

In this tutorial, we'll walk through creating your own messenger bot with a back-end ready to go, powered by Backand and live - all in 10 minutes.

###Basic Auth To use Admin's permission in the server side action or imperonsate to other user use basic auth Authorization header:

###Back& server side Action In the action change the headers code to be this line:

headers:{'Authorization':'basic ' + btoa (username + ':'+ password) }