问题标签 [facebook-chatbot]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
facebook-messenger - Facebook Messenger 是否在订阅的 webhook 上提供时区?
我正在创建一个聊天机器人,我想在本地时区显示时间细节。Facebook Messenger 是否在订阅的 webhook 上提供时区?
node.js - 使用 facebook messenger 聊天机器人时如何在本地存储用户信息?
我按照 facebook 的文档设置了我的 Messenger 机器人。当只有我在使用它时,它工作得很好,但我不知道如何在本地创建变量并将信息存储在其中,以便我可以获得每个用户的个人信息。
例如。如果我要求他们输入他们的电话号码,我应该如何/在哪里保存它,以便在新用户来输入他的号码时不会被覆盖(如果变量是全局声明的),我也可以稍后使用它。
我使用了 Node JS 并按照他们在文档中提到的步骤进行操作。
java - Facebook Messenger - ChatBot - wit.ai 集成
我的应用程序在tomcat实例上的AWS上运行,带有Java代码和mongodb数据库。
我现在需要将它与 Facebook Messenger ChatBot 和 wit.ai 集成。
我真的很难开始,我找到了一些示例代码,但使用不同的语言。
我可以运行它并与在 Tomcat 上运行的门户集成吗?它应该同时调用 Facebook Messenger 和 wit api。
我需要获得关于如何进行的高级想法。
botframework - 使用 JavaScript 的 Kik、Facebook 和 Slack 消息传递机器人使用哪个机器人框架(如果有)?
我正在构建一个需要在 Kik、Facebook 和 Slack 上启动的聊天机器人。我不确定在使用机器人框架方面从哪里开始,或者我是否应该自己创建一些自定义的东西。
我不相信我需要任何 NLP。用户将被推下一条非常结构化的路径,该路径将使用按钮引导用户进入下一个提示,并且还将与用户链接和媒体共享。
Microsoft Bot Framework 似乎是我应该考虑的主要框架,但我不清楚如果我最终想要为每个消息传递平台提供自定义的响应,它会有多大用处。意思是,在 Facebook 上,我可能想利用他们拥有的自定义功能,例如按钮或模板,而在 Kik 上,我想利用建议的键盘。
任何建议或指导表示赞赏。
facebook - 为其他用户设置 Facebook Messenger 机器人?
我正在开发一个通用的 Messenger Robot,它可以引导用户完成结构化的对话。机器人的用户可以通过配置分享他们喜欢的任何东西。例如,有人可以设置他们的人生故事,并分阶段经历,童年,大学,职业生涯。这些阶段中的每一个都可以细分为子阶段,依此类推。
有没有办法可以为 FB 用户设置机器人?我不想为了为他们创建一个机器人而去访问用户的 FB 个人资料。我希望我的网站或 FB 应用程序能够为用户设置它而无需他们大惊小怪。用户只需提供故事并允许访问 FB,而所有技术细节都将在后台处理。
想法受到赞赏,
——马特
python - Facebook 聊天机器人多次发送相同的消息(Python)
我正在开发一个 facebook 迷你聊天机器人,我遇到了一个问题,即机器人一遍又一遍地接收相同的消息,即使它已经回答了该消息。
我知道我每次都需要发送一个状态 200,我确实这样做了,但仍然一遍又一遍地收到相同的文本
这是我订阅的事件
对话,message_deliveries,message_reads,消息,messaging_optins,messaging_postbacks,图片
我删除了messaging_echoes,因为我认为原来不是问题
facebook - 如何创建用于测试聊天机器人的测试 Facebook 页面
我正在使用wit.ai为Facebook Messenger 平台开发一个聊天机器人。
我创建了一个 facebook 页面来测试机器人,但该页面对每个人都是可见的。有没有办法让我的 facebook 页面只对我和我添加到developers.facebook.com的测试人员可见?我尝试在 facebook 中取消发布该页面,但如果我这样做了,当我在Messenger 平台中搜索时,即使我的帐户也看不到该页面。
提前致谢!
facebook - 从 Facebook Messenger Chatbot api 获取用户当前位置
我正在研究 fb messenger bot,我想访问用户的当前位置,而不需要他们将其作为附件发送。我试图从 fb graph API 获取用户的当前位置,但似乎从他们的个人资料中返回用户的位置。我需要像实时地理坐标这样的东西。
提前致谢!
facebook - In Facebook messenger API, how to prevent button postback payload text from being logged to chat window on click?
TLDR; @ bottom
I asked the following question in the Facebook bugs section
NOTE: This is more of a platform design suggestion than a bug, as I failed to find a Chat API feedback portal
Currently I'm building a Chat bot that allows the user to track a goal. It will say something like "Did you go for a walk on July 12, 2016 ?" and have Yes/NO buttons below.
Currently in order to pass the intent, the day and the achievement boolean I need to template a string like this "==GOAL== achieved? <<<{goal_achieved}>>>, date tracked [[[{date_tracked}]]]" and use regex to capture the delimited variables. This is prone to parsing error in other cases where the templated strings in the payload are user-input variables i.e. if the '{goal_achieved}' were replaced with the goal variable '>>meditated" then the regex that captures the templated variable could fail.
One could use the postback payload to store a JSON-encoded string but the problem with this is that the payload string gets logged into the user output and JSON strings are a bit ugly and confusing. The challenges I face could be easily remedied if the payload was not logged to the user Instead log the text for the button to help the user confirm the button was clicked.
If that is not possible, is there any other advice for encoding data into button payload ?
The following answer was offered (Mark Wiltse)
Hi Justin, Unfortunately at this time our payload structure does not support the functionality that you are trying to implement. From my understanding you want to use the Payload to inform your backend if the user accomplished their 'goal' on that specific date. I would suggest that you create your payload response for the button on your end before passing it to us, which is basically the JSON idea that you had initially. I know this is a bit cumbersome to handle but the payload response passed back is independent of the text that was provided with the messenger thread. I would suggest that you also attempt to sanitize your strings if you are worried a user has previously provided you would cause an issue with your regex. You should be able to implement this functionality if the prior user data is sanitized to avoid any issues with regex/json parsing. Since this is an implementation question I will have to close this report as Invalid. If you are still looking for additional insights and concrete tips for implementing this flow please post to our stack overflow where we have Facebook Engineers and a wide range of community members who also contribute. http://facebook.stackoverflow.com/ Take care and best wishes with your messenger bot. Mark
This sentence was particularly unclear:
I know this is a bit cumbersome to handle but the payload response passed back is independent of the text that was provided with the messenger thread.
TLDR; Can anyone inform me of how to prevent the button from logging the payload string so that I can use it to pass JSON to my app without the user seeing it ?