How to Implement
Let's go step by step.
- You need to install our nodejs package to your project
npm install monosay
- You must create a bot on our platform
Create a Bot (If you already have a bot skip this step.)
- You must create a channel to connect with
If you already have your token just skip this step
- Go to your bot
- Click channels
- Create Your Channel by selecting "Botkit"
- Copy Your Token
Keep your token for next step.
- Import the library
var Botkit = require('botkit');
// ...
const monosay = require('monosay').usebotkit("YOUR_MONOSAY_BOTKIT_TOKEN");
// ...
- Initialize the library
// ...
var controller = Botkit.facebookbot({
access_token: process.env.access_token,
verify_token: process.env.verify_token,
validate_requests: true,
app_secret: process.env.app_secret
})
// ...
// Initialize the library
monosay.init(controller);
// ...
- Start messaging with your bot.
- Go to your bot's dashboard
- You will start to see your Analytics, Conversations and more...
Congratulations! You have finally implemented {mono}say into your Bot.