问题描述
我创建了一个信使机器人,我执行的某些操作可能需要一些时间.所以为了让用户等待,我想显示指示器气泡".(当你与之交谈的人打字时你看到的那个):
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):
Messenger API 文档中没有定义如何执行此操作,但是当您点击callBack"时,他们似乎有可能执行此操作.在他们的卡上.
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.
我该如何模拟?
推荐答案
现在可以通过 Sender Action 进入 messenger bot API.您可以在此处找到文档.
It's now available into the messenger bot API via the Sender Action. You can find the documentation here.
这只是一个带有打开或关闭值的帖子,用于显示/隐藏气泡指示器.
It's just a post with an on or off value to display / hide the bubble indicator.
{
"recipient":{
"id":"USER_ID"
},
"sender_action":"typing_on" // typing_off
}
这篇关于Facebook messenger API bot:“打字气泡""指标泡沫"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!