Git Product home page Git Product logo

facebook-chat-bot's Introduction

Facebook Chatbot

Maintainability Test Coverage

The Facebook Chatbot is your toolbox for building bots.

System dependencies

  • Ruby version: 2.2.5
  • Rails version: 4.1.16
  • Mysql
  • Redis
  • Sidekiq

Configuration

alt text

In .env file

The Client ID obtained from the Google API Console. Replace with your own Client ID.

GOOGLE_CLIENT_ID=client_id
GOOGLE_CLIENT_SECRET=client_secret

For development using localhost

GOOGLE_CALLBACK_URL=http://localhost:3000/oauth_callbacks
GOOGLE_CLIENT_ORIGIN=http://localhost:3000

The Browser API key obtained from the Google API Console.

GOOGLE_API_KEY=api_key

For login to sidekiq production, so replace with your own.

SIDEKIQ_USERNAME=sidekiq_username
SIDEKIQ_PASSWORD=sidekiq_pwd

Replace with your sql user_name and password

FACEBOOK_CHAT_BOT_DATABASE_USERNAME=sql_username
FACEBOOK_CHAT_BOT_DATABASE_PASSWORD=sql_password

Raplace token with your own token for validation with facebook webhook

FACEBOOK_VALIDATION_TOKEN=token

The app id and app secret obtained from Facebook developer by creating app.

FACEBOOK_APP_ID=app_id
FACEBOOK_APP_SECRET=app_secret

Database creation

  • For development:
rake db:prepare_for_dev
  • For Test:
rake db:prepare_for_test

How to run the test suite

To run the tests

rspec .

To run lint

rubocop .

Run

  • Install redis and start redis with
redis-server
  • Start sidekiq
sidekiq
  • Start project
rails s

facebook-chat-bot's People

Contributors

kakada avatar hengsokly avatar thyda-eng avatar dependabot-preview[bot] avatar mouyleng avatar

Watchers

 avatar  avatar Channa Ly avatar Radin Reth avatar Sokmesa Khiev avatar  avatar  avatar

Forkers

channainfo

facebook-chat-bot's Issues

Condition evaluation broken when response value contains quote(single/double)

Step to reproduce:

  1. design an xlsform with 2 questions(first is select_one and second is text with logic ${select_one} == '1')
  2. upload to bot -> connect with FB page 'ABC'
  3. activate bot
  4. Visit FB page 'ABC' as page visitor
  5. Get Started with page messenger
  6. reply > I can't ... -> nothing response to page visitor(condition evaluation broken)

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.