I have setup the Facebook Messenger by following correct steps. I could verify the webhook successfully as well as subscribed to the page. But when I am sending a message to the bot, its not coming to the server.
I noticed in the Facebook App settings, the graph API version is 3.3 I have other bot running successfully with v2.9
What can be done to make the bot running?
Webhook successfully registered:
const verifyWebhook = (req, res) => {
let VERIFY_TOKEN = 'lumicentco';
let mode = req.query['hub.mode'];
let token = req.query['hub.verify_token'];
let challenge = req.query['hub.challenge'];
if (mode && token === VERIFY_TOKEN) {
res.status(200).send(challenge);
} else {
res.sendStatus(403);
}
};
module.exports = verifyWebhook;
Message-webhook.js
const processMessage = require('./process-message');
module.exports = (req, res) => {
if (req.body.object === 'page') {
req.body.entry.forEach(entry => {
entry.messaging.forEach(event => {
if (event.message && event.message.text) {
processMessage(event);
}
});
});
res.status(200).end();
}
};
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I have implemented log in with facebook using passportjs
My simple Nodejs app serves static files, e
I try to display results with Mongoose and Handlebars but I can'tIs this a problem withe the structure and the fact that the "results" arrays are strangely structured ? I want each object to be displayed in my page
I created a simple fullstack webapp using NodeJS & Express + MongoDB to build the backend API and VueJS for the frontend