Passing Facebook Messenger bot webview data to Dialogflow and continuing the conversation

让人想犯罪 __ 提交于 2019-12-13 03:24:48

问题


I am using Dialogflow and Facebook messenger to build a interface that opens a Facebook Messenger webview to allow the user to input data. Once the user inputs the data in the webview I want to:

  1. Get this data send to Dialogflow and
  2. continue the conversation with the user and ask them a follow up question

How can I do this?


回答1:


Dialogflow doesn't current listen for Facebook Messenger webview events. Dialogflow supports Facebook Messenger welcome (i.e. when the user opens a chat window to start talking to your bot) and Facebook location to get the user's location




回答2:


Actually, you can do, when you submit the form from the Webview you will get data in body with PSID. and send the response based on user's Input from Webview. Once users are done with form submission make sure you store those data somewhere and when a user asks something relevant to it you can fetch data and give an appropriate response.



来源:https://stackoverflow.com/questions/50864959/passing-facebook-messenger-bot-webview-data-to-dialogflow-and-continuing-the-con

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!