I am developing a bot using nodejs on fb messenger. While testing it, I found that when a user sends a sticker, the facebook messenger sends that message as attachments with sticker_id key. After parsing that message, when I send the res.send(200), facebook doesn't seem to recognize it. Does anyone know how to fix this issue?
server.post('/', (req, res, next) => {
f.incoming(req, res, msg => { //this function parses the input message from facebook and returns message object and sender id
const {
message,
sender
} = msg
console.log(msg); //this gets printed with message object which includes the sticker_id and sender id
if(message.text) {
f.txt(sender, 'Hi there');
}else {
console.log('we are in else block..');
f.txt(sender, `I couldn't get you. Sorry :(`);
}
});
res.send(200);//this is not working
return next();
});
Hi all
I am developing a bot using nodejs on fb messenger. While testing it, I found that when a user sends a sticker, the facebook messenger sends that message as attachments with sticker_id key. After parsing that message, when I send the res.send(200), facebook doesn't seem to recognize it. Does anyone know how to fix this issue?