2
votes

Hi I'm writing a Facebook Messenger bot that has a few nice looking card actions - that end up taking up a large portion of the chat window. The problem is that the soft keyboard on phones such as iPhone and Android still displays, constraining the visible area of the chat to an even smaller window, obscuring the card.

Is there a way I can send some sort of specific JSON down in my bot messages to indicate to FB Messenger that the keyboard should be hidden until the user clicks back into the message entry area?

Thanks.

2

2 Answers

3
votes

One option could be is using the Persist Menu feature and set the composer_input_disabled property to true.

From the docs:

Disables the Messenger composer field if set to true. This means your bot can only be interacted with via the persistent menu, postbacks, buttons, and webviews.

Some useful links:

0
votes

As Ezequiel pointed out. You can use the persistent menu feature for Facebook Messenger. If you are using the .NET SDK check out the sample I created:

https://github.com/FranciscoPonceGomez/Persistent-Menu-Facebook