我試圖在Facebook bot實現中詢問後續問題「快速回復」。你可以看到完整的app.js(示例文件在這裏):https://github.com/fbsamples/messenger-platform-samples/blob/master/node/app.jsJavascript正在等待函數響應完成
當1)用戶輸入命令 - 例如「你好」,在我向用戶發送相關回復後 - 2)我想問一個跟進問題。 「你想知道今天的天氣嗎?」
case 'hello':
sendHelloGenericReponse(senderID);
sendWeatherQuickReplyQuestion(senderID); //only execute this after above is complete
break;
I.e.我想在做2之前等待1完成。但是,由於某些原因,天氣問題總是首先顯示給用戶。任何幫助,將不勝感激
功能的使用您在'sendHelloGenericReponse'和'sendWeatherQuickReplyQuestion'方法的承諾? –