Facebook Messenger API机器人:“打字泡沫" "指标泡沫" [英] Facebook messenger API bot : "Typing bubble" " indicator bubble"

查看:101
本文介绍了Facebook Messenger API机器人:“打字泡沫" "指标泡沫"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Messenger机器人,而我执行的某些操作可能需要一些时间.因此,为了使用户等待,我想在屏幕上显示指示器气泡". (当您与之交谈的人打字时,您会看到的那个人):

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.

我该如何模拟呢?

推荐答案

现在可以通过发件人操作"将其添加到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机器人:“打字泡沫" "指标泡沫"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆