问题
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:
- Get this data send to Dialogflow and
- 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