-1

We develop a chatbot based on the Facebook Messenger Platform.

In the middle of the conversation, we do want to show a complex UI as a WebView. When the user clicks on a button in the WebView, it should close the webview and invoke a user-question in the conversation which will be answered by our bot.

I've managed to show the WebView, send back a message to my backend and give an answer to the user.

But how can I create a new message as "the user" out of my WebView?

Sample Dialog:

Bot (in the conversation): Which hat do you want? [Button to open hat-selection-WebView]

User (in the WebView): [Click on a button in the hat-selection-WebView]

User (in the conversation): I want the green one < How can I create this message here

Bot (in the conversation): Ok, I'll send it to you soon

Stefan
  • 1,007
  • 1
  • 11
  • 32

1 Answers1

1

You can use "Quick Replies" for this: https://developers.facebook.com/docs/messenger-platform/send-api-reference/quick-replies

The button text will be the message from the user.

andyrandy
  • 72,880
  • 8
  • 113
  • 130
  • Nope, I'm in a WebView, I do not have quick-replies in there. But I do want exactly the functionality quick-replies provide... just custom made :) – Stefan Aug 16 '17 at 15:28
  • 1
    ok, i don´t think that´s possible. you can´t just set a custom user message without quick replies, that would be weird and easy to hack. – andyrandy Aug 16 '17 at 15:43