通过api.ai将按钮响应发送给FB Messenger

编程入门 行业动态 更新时间:2024-10-09 22:23:06
本文介绍了通过api.ai将按钮响应发送给FB Messenger的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经开始使用具有fb Messenger集成的diaglofFlow a.k.a api.ai。

I have started playing with diaglofFlow a.k.a api.ai with fb messenger integration.

我定义了一个意图,当前返回3个响应。 2个文本响应和1个自定义有效负载。

I defined an intent which current returns 3 responses. 2 text responses and 1 custom payload.

两个文本响应都很好,但是自定义有效载荷(假设返回一个按钮)就不行了。

the 2 text responses comes just fine but the custom payload which is suppose to return a button is not.

自定义有效载荷如下

{ "recipient": { "id": "1234" }, "message": { "attachment": { "type": "template", "payload": { "template_type": "button", "text": "What do you want to do next?", "buttons": [ { "type": "web_url", "url": "www.messenger", "title": "Visit Messenger" } ] } } } }

另外,请注意,接收者ID是我不确定应如何提供的东西。 fb文档说应该是收件人的号码。我不知道我将如何获得它?

Also, please note that the recipient id is something i am not sure how it should be provided. the fb documentation says it should be number of the recipient. I do not know how i am going to get that?

推荐答案

实际上是可行的

{ "facebook": { "attachment": { "type": "template", "payload": { "template_type": "button", "text": "What do you want to do next?", "buttons": [ { "type": "web_url", "url": "www.messenger", "title": "Visit Messenger" } ] } } } }

更多推荐

通过api.ai将按钮响应发送给FB Messenger

本文发布于:2023-11-28 04:55:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641035.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   发送给   ai   api   FB

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!