Facebook messenger API bot:“打字气泡""指标泡沫" [英] Facebook messenger API bot : "Typing bubble" " indicator bubble"

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

问题描述

我创建了一个信使机器人,我执行的某些操作可能需要一些时间.所以为了让用户等待,我想显示指示器气泡".(当你与之交谈的人打字时你看到的那个):

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:“打字气泡""指标泡沫"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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