gpt4 book ai didi

node.js - 检查 botframework (node.js) 的 facebook 点赞情况

转载 作者:太空宇宙 更新时间:2023-11-04 00:05:03 25 4
gpt4 key购买 nike

我面临一个问题,无法确定用户是否发送了“竖起大拇指”。

我找到了一个包( https://www.npmjs.com/package/botbuilder-facebook-thumbs-up ),但是我仍然无法检测到“竖起大拇指”。

期望:当用户按下facebook的“竖起大拇指”时,它应该返回“哈哈谢谢!”。

实际:当用户按下 Facebook 的“竖起大拇指”时,它应该返回“抱歉,我无法回答这个问题。”。

请就问题提出建议

enter image description here enter image description here

最佳答案

var bot = new builder.UniversalBot(connector, [
function (session) {
// Check whether the user pressed the Facebook Thumbs Up
// button in Messenger, and respond appropriately:
var msg = session.message.sourceEvent.message.sticker_id;
if (msg == "369239263222822" || msg == "369239343222814" || msg == "369239383222810") {
session.send('haha thanks!');
}
else {
session.send('Sorry, I’m not set up to answer that.');
}
}

]);

关于node.js - 检查 botframework (node.js) 的 facebook 点赞情况,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52713211/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com