facebook-messenger-bot

res.send(200) issue on facebook messenger bot

旧街凉风 提交于 2019-12-24 20:42:28
问题 I am trying to build a facebook messenger bot using nodejs. I got the bot developed with core features. While testing for a negative scenario where the user sends in a GIF or sticker, it has to respond "I couldn't get you. Sorry". It does send that message but it hangs and keeps sending that message thereafter every few minutes. I noticed that the ngrok server threw an 500 HTTP Internal Server Error for the POST request. On further debugging, I was able to find out that res.send(200) is not

What is the right way to message the user after 120 seconds of inactivity in my messenger bot?

烂漫一生 提交于 2019-12-24 07:04:38
问题 I am using the bot framework to build a quiz bot and I want the person to get a message from the bot if they become inactive in 2 mins. When I tried bot.dialog('/', [(session)=>{ session.dialogData.inactive = setTimeout(()=>{ session.send('You there?') },30000) }]) It gives me this error TypeError: Converting circular structure to JSON at Object.stringify (native) at addWrite (D:\bots\zupquiz\node_modules\botbuilder\lib\bots\ChatConnector.js:261:29) at ChatConnector.saveData (D:\bots\zupquiz

Facebook messenger bot error nonexisting field (messages)

女生的网名这么多〃 提交于 2019-12-22 14:40:07
问题 I am a new member. I have an error when send message using HTTP Post to "graph.facebook.com/v2.11/me/messages?access_token=MY_PAGE_TOKEN" This is error return: `{"error":{"message":"(#100) Tried accessing nonexisting field (messages) on node type (Page)","type":"OAuthException","code":100,"fbtrace_id":"EB39Xkxnf6O"}}` Despite error, tester and developer still able to receive message. But the FB viewer might not and they not approve my review submission: "We did not receive an automated

Facebook messenger bot error nonexisting field (messages)

青春壹個敷衍的年華 提交于 2019-12-22 14:38:08
问题 I am a new member. I have an error when send message using HTTP Post to "graph.facebook.com/v2.11/me/messages?access_token=MY_PAGE_TOKEN" This is error return: `{"error":{"message":"(#100) Tried accessing nonexisting field (messages) on node type (Page)","type":"OAuthException","code":100,"fbtrace_id":"EB39Xkxnf6O"}}` Despite error, tester and developer still able to receive message. But the FB viewer might not and they not approve my review submission: "We did not receive an automated

Are Facebook Messenger page-scoped IDs globally unique?

拜拜、爱过 提交于 2019-12-22 08:22:46
问题 I understand that the same user will have different page-scoped IDs (PSIDs) across different pages. But is it guaranteed that no two users will have the same PSID across different pages? For example, is it possible that user A has PSID 1234 while messaging page X, and user B has the same PSID 1234 when messaging page Y? Technically user A and user B would be differentiable even if they have the same PSID because they are messaging different pages. But can I assume that there will be no

Access Facebook Messenger User Profile API in DialogFlow

北城余情 提交于 2019-12-21 20:36:19
问题 I'm building a cross-platform chatbot in Google's DialogFlow. I'd like to access the Facebook User Profile API to learn the user's first name. I'm struggling to find advice on how (or if) I can make this happen. https://developers.facebook.com/docs/messenger-platform/identity/user-profile/ Has anybody here achieved this? 回答1: I did that for one of my bots yesterday, you need 2 things, first the Page Token and second is the psid which is Page scope user ID. On dialogflow, you will receive the

Any idea on how to get this id from the conversation between attendee and bot?

假如想象 提交于 2019-12-19 03:46:13
问题 Context: BotFramework (C# SDK) + Messenger channel, bot handles two types of users: attendees (Messenger users) and organizers (who are Facebook Page's admins). Use case: When an attendee requests a human support (using an option in my bot's menu), the organizer will receive a message. In that message, I would like to add a button that will do the following once clicked by the organizer: stop the automatic replies from the bot to that user redirect the organizer to Facebook's Page inbox, with

Sequential Message Sending Using Facebook Send-API

大城市里の小女人 提交于 2019-12-13 20:43:33
问题 I'm trying to send messages using FB Send-Message API in sequential order, but have an issue with it. As a result my bot sends messages in wrong order. I have the following functions: function sendMessage(recipient, payload, accessToken) { return axios.post(baseURL + 'v2.11/me/messages/?access_token=' + accessToken, Object.assign({}, { messaging_type: "RESPONSE", recipient: { id: recipient } }, payload) ); } (1)(returns Promise of sending message); let async_actions; let promise_chain = Q

Passing Facebook Messenger bot webview data to Dialogflow and continuing the conversation

让人想犯罪 __ 提交于 2019-12-13 03:24:48
问题 I am using Dialogflow and Facebook messenger to build a interface that opens a Facebook Messenger webview to allow the user to input data. Once the user inputs the data in the webview I want to: Get this data send to Dialogflow and continue the conversation with the user and ask them a follow up question How can I do this? 回答1: Dialogflow doesn't current listen for Facebook Messenger webview events. Dialogflow supports Facebook Messenger welcome (i.e. when the user opens a chat window to

Sending multiple reply messages on single postback in Facebook Messenger Bots

时光毁灭记忆、已成空白 提交于 2019-12-12 10:08:00
问题 I want to send multiple replies for a single user-triggered postback on Messenger. I've been following Messenger's developer documentation and couldn't really find how to do this. My code structure is very similar to the tutorials they've given on the site, I have a ' handlePostback ' function which identifies the received postback and compares it to a set of predefined payloads to find the ' response ' JSON object. This response is given to ' callSendAPI ' which puts this JSON object into