Reputation: 181
I've created a messenger bot, and some action that I perform can take some time. So in order to make the user wait I would like to display the "Indicator Bubble" (the one you see when the people you talk with are typing):
It is not defined in the Messenger API documentation how to do it, but it seems possible has they perform it when you hit "callBack" on their card.
How can I simulate this?
Upvotes: 18
Views: 14171
Reputation: 196
I know it is a hack, but currently I send the "Typing Bubble Indicator" as a animated gif as my first reply, if I anticipate a waiting time (like an API call). At the user end, you can't tell the difference.
Upvotes: -1
Reputation: 191
Yes, it is the only way.
When you have the Button Template and someone clicks on "button" for "postback" (documentation in section "button template").
Then during your parsing of the message and sending answer, it is shown like "writing".
Upvotes: 0
Reputation: 81
The official messenger API does not support this feature for now. Even if @hiponcho – one of the featured by Facebook chatbot is actually using it.
A workaround would be to use the unofficial messenger API, which has a method called sendTypingIndicator
that does exactly what you want. But be careful, you can be banned for using of non-official API.
api.sendTypingIndicator(threadID, [callback])
Upvotes: 0