我正在使用 Api.ai 制作一个用于提供健康建议的聊天机器人。
我想每天向用户发送推荐的锻炼计划。但是 Api.ai 中的 Intent 只能在用户说话时做出响应。
我应该使用事件来做吗?但是我怎样才能触发一个事件,让它每天或每 n 小时向用户发送消息呢?或者还有其他解决方案吗?
谢谢!!
最佳答案
Facebook 去年通过标准消息权限取消了这种能力。您现在拥有 24hrs to respond到用户发起的消息。有几个异常(exception),包括:
看起来 Facebook 推出了订阅消息传递,这需要额外的 Facebook 权限,该权限需要添加到您的应用程序 review submission .
此外,API.ai session 也会过期。
By default, contexts expire after either five requests or ten minutes from the time they were activated. Intents that renew the context will reset the counter and clock to give an additional five requests and ten minutes.
You can change the context lifespan in the settings of each context.
虽然改变生命周期可能只会增加它所支持的请求数量,因为没有提到增加时间。
TL;DR:两个平台上的限制和限制意味着这可能是不可能的。
关于chatbot - 使用 Api.ai 定期向用户发送消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42356034/