Open tschnoelzer opened 6 years ago
Hi Team,
I need a solution to work with FB messenger and deploy on firebase functions. It is possible to deploy express apps to functions like explained here: https://codeburst.io/express-js-on-cloud-functions-for-firebase-86ed26f9144c
I can not find a way to call the bot from within a cloud function.
any clue?
const functions = require("firebase-functions") const BootBot = require('bootbot');
const bot = new BootBot({ accessToken: '...', verifyToken: '...', appSecret: '...' });
bot.on('message', (payload, chat) => { const text = payload.message.text; chat.say(Echo: ${text}); });
Echo: ${text}
-- > not working //bot._initWebhook(); // const api2 = functions.https.onRequest(bot.app); // module.exports = { // api2 // }
-- > working bot.start();
Hi Team,
I need a solution to work with FB messenger and deploy on firebase functions. It is possible to deploy express apps to functions like explained here: https://codeburst.io/express-js-on-cloud-functions-for-firebase-86ed26f9144c
I can not find a way to call the bot from within a cloud function.
any clue?
const functions = require("firebase-functions") const BootBot = require('bootbot');
const bot = new BootBot({ accessToken: '...', verifyToken: '...', appSecret: '...' });
bot.on('message', (payload, chat) => { const text = payload.message.text; chat.say(
Echo: ${text}
); });-- > not working //bot._initWebhook(); // const api2 = functions.https.onRequest(bot.app); // module.exports = { // api2 // }
-- > working bot.start();