The Facebook Chatbot is your toolbox for building bots.
- Ruby version: 2.2.5
- Rails version: 4.1.16
- Mysql
- Redis
- Sidekiq
-
Register and setup Google app
-
Register and setup Facebook app for Chatbot and Login with Facebook
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
- For development:
rake db:prepare_for_dev
- For Test:
rake db:prepare_for_test
To run the tests
rspec .
To run lint
rubocop .
- Install redis and start redis with
redis-server
- Start sidekiq
sidekiq
- Start project
rails s