smooch - 结合回复和回发按钮
问题描述
如何在一条消息中组合多种类型的操作按钮(回复和回发)?例子:
{
"type":"text",
"text":"The more you know, am I right? Would you like to learn...",
"actions":[
{
"type":"postback",
"text":"From a human",
"payload":"Edu - human"
},
{
"type":"reply",
"text":"From content",
"payload":"Edu - content"
},
{
"type":"reply",
"text":"From your peers",
"payload":"Edu - community"
},
{
"type":"reply",
"text":"Something else",
"payload":"Something else"
},
{
"type":"reply",
"text":"just to test",
"payload":"just to test"
}
],
"role":"appMaker",
"name":"Flowdev"
}
上面的例子只是没有在 Smooch 聊天中显示。如果我将第一个操作类型更改为回复或将其他三个更改为回发,则会显示该消息。
解决方案
postback
动作可以与其他持久按钮类型 ( link
/ buy
/etc.)
组合。reply
动作不能与持久按钮组合。
推荐阅读
- html - css flexbox布局模块中的表格设计
- python - AttributeError:实例仅在 Linux 中没有属性错误
- javascript - RangeError:运行快照测试时超出了最大调用堆栈大小
- python - 检查用户是否已在 python 中使用 selenium 成功登录
- jenkins - 如何在具有节点,阶段的詹金斯文件中使用凭证功能
- laravel - 如何使用 Encrypter 包在 laravel 中显示 AES 加密密钥?
- java - java 文档中未注明作者的内容是什么
- javascript - 仅在构建程序后出现神秘的 css 错误,JS React
- angular5 - angular5中带有文本框的下拉菜单
- php - 在图像标签正则表达式中替换 .PNG 扩展名后的数据