GithubHelp home page GithubHelp logo

olympikesoft / messenger-bot-sails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from freeways/messenger-bot-sails

0.0 1.0 0.0 182 KB

boilerplate for facebook messenger bots on sails

Shell 0.05% JavaScript 75.34% CSS 0.25% HTML 24.36%

messenger-bot-sails's Introduction

messenger-bot-sails

boilerplate for facebook messenger bots on sails js

What it offer

Upon deploying you will have an empty website with a deactivated API and a ready to implement Messenger chat bot ๐Ÿš€

The app is configured to be ready to deployed on RedHat openShift, but you can tweak it and deployed on the hosting provider of your choice

How to :

Fork & Clone this repository and run npm install

git clone https://github.com/Freeways/messenger-bot-sails
cd messenger-bot-sails
npm install

Create your page and bot on developers.facebook.com

Edit your config/messenger.js with the values you've generated from facebook

Start implementing your bot logic at api/controllers/BotController.js

Sending messages

First you would like to take a look at Facebook Send API.

To respond within the api/controllers/BotController.js you can use function sendAPI.send(yourResponse, aCallback) where your response is a valid message (see the link above) and aCallback is function to be executed after sending.

Alternatively, a better practice would be to add methods to the api/utils/sendAPI.js

Activating the API

First keep on mind that the API does not come with an authentication system so it is open to public (unsecure).

To activate the API on the file config/blueprints.js please change the values of actions, rest and shortcuts to true.

messenger-bot-sails's People

Contributors

bashz avatar

Watchers

James Cloos 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.