I want to know if the user blocks the chat bot. Going through the documentation I didn’t find a way to do it, so I had to create a work around.
I send a message to the user and create a flag of sending; then I use the sleep function for 10 seconds. Every time a user receives a message my code change the flag from sending to send. After 10 seconds, if the flag is still on sending means that the receiver didn’t get the message, so I infer that the chat bot is blocked.
There are some flaws with this work around like if the message takes more than 10 seconds to arrive and I don’t know why if I use the sleep function for >15 seconds, I get into a loop, and the Fb API start sending me requests.
Someone has a better solution??
I appreciate your help! (:
Check errors with code “10” subcode “2018108” or code “200” subcode “1545041”. These subcodes mostly define that user have blocked your bot/messenger conversation.
I tested today, with the latest iOS Messenger app, and I found out, that, for each of the following cases
User turns off messages
User taps on 'somethings wrong' -> report -> other / spam / inappropriate (=this is what you probably mean by 'block')
the Facebook Messenger API returns
{"error":{"message":"(#551) This person isn't available right now.","type":"OAuthException","code":551,"error_subcode":1545041,"fbtrace_id":"XXXXX"}}
Thus, the answer to your question is to check for error code 551, subcode 1545041. Be aware that you will get back the 'blocked' users lumped together with those who tapped on 'turn off messages'.
By the way, you are able to see the percentage of users who blocked a Messsenger conversation by going to the associated Facebook Page and tapping on the top row at 'Insights'.
Hope this helps others, it took me a couple of hours of my life, to learn this :)
Related
Hey I'm a new Dialog Flow user, I love the application, but there is an issue I can't solve. My bot assistent actually is very simple is made by a simple menu with numbers, each number has a intent:
(1) How our business works
(2) Services
(3) Our benefits
(4) Project request
(5) Financial
(6) Meeting and appointments
(7) Contact
(8) Questions and technical support
Default fallback intent
Default welcome intent
Every numbers has a away to come back to the main menu, and a away to ask for a real assistent.
For exemple: Meeting and appointments (6)
We do weekly video call alignments, as well as you can follow the progress of the project on Trello. If you want to schedule a meeting time, send an email to gorilafreela#gmail.com, inform when, reasons, we use the https://meet.google.com platform for meetings. Type [X] to return to the menu. Enter [A] to request a real answer.
The problem is when the user decide to tap 'A' for request a real assistent. This should end the flow and stop doing a loop. I followed the official Google Dialog flow documentation and to finish the flow they suggested:
1 - Add event: actions_intent_CANCEL
2 - Set this intent as end of conversation
But even doing this steps, the conversation doesn't stop there. When someone call the real assistent dialog flow answer: What can I help ?, then the user ask his question, however it always go to fallback and the conversation does not finish there. I haven't integrated nodejs with dialogflow yet, but I think it isn't necessary to force a quit conversation. What can I do?
Hey I'm a new Dialog Flow user, I love the application, but there is an issue I can't solve. My bot assistent actually is very simple is made by a simple menu with numbers, each number has a intent:
(1) How our business works
(2) Services
(3) Our benefits
(4) Project request
(5) Financial
(6) Meeting and appointments
(7) Contact
(8) Questions and technical support
Default fallback intent
Default welcome intent
Every numbers has a away to come back to the main menu, and a away to ask for a real assistent.
For exemple: Meeting and appointments (6)
We do weekly video call alignments, as well as you can follow the progress of the project on Trello. If you want to schedule a meeting time, send an email to gorilafreela#gmail.com, inform when, reasons, we use the https://meet.google.com platform for meetings. Type [X] to return to the menu. Enter [A] to request a real answer.
The problem is when the user decide to tap 'A' for request a real assistent. This should end the flow and stop doing a loop. I followed the official Google Dialog flow documentation and to finish the flow they suggested:
1 - Add event: actions_intent_CANCEL
2 - Set this intent as end of conversation
But even doing this steps, the conversation doesn't stop there. When someone call the real assistent dialog flow answer: What can I help ?, then the user ask his question, however it always go to fallback and the conversation does not finish there. I haven't integrated nodejs with dialogflow yet, but I think it isn't necessary to force a quit conversation. What can I do?
I'm making a Pepper app with Choregraphe and I have a doubt:
Pepper has to maintain a conversation with a human user and the problem is that if the user "disappears", the app is in middle of an state, and if it doesn't get any interaction, it should got to the first state (return to the start of the program). The idea was to use a timeout of no response (like the timeout between machines). Is there a way to do this with Choregraphe?
PD: The project is big and there are a lot of boxes, so add a timeout box and link it to all boxes can be messy.
PD: I have been looking to make a trigger condition, but in the condition it should detect tablet interactions like touch or that user talk to the robot.
A good way is to put all the "lot of boxes" into a parent-box (new box/diagram box).
Thus when you time out, you just stop the parent box, and all the inner box will be stopped automatically.
I am making an RPG game with C++/x86 asm. My question is related to the C++ component. In C++/win32 how would I detect if the computer is shutting down or turning off, or whatever else - so that I can save the game session. My game has a 'save' option, but if the user or another program decides to shut off the computer how can I detect this with some kind of API hook so that I can instantly save the game session to the text file.
Now please don't suggest an option by creating a thread to run passively as I want to keep the file size to a minimum, so if you can suggest some sort of WM_ hook that would be great. I'd refer to MSDN but I don't want to be searching for hours through their WM directory.
You can handle session saving in response to the WM_ENDSESSION message. Note that after your message handler returns from handling this, your process may be terminated at any time, so you need to save it directly during the message handler, and not just set a flag to let some later code handle the saving, because that later code might not get to execute.
A comment suggests the WM_QUERYENDSESSION message. This has a slightly different meaning: it gives applications the chance to complain about the session ending, and gives the user a chance to not log off / shut down the system. Based on your question, you have no intention of preventing any such thing, so WM_ENDSESSION seems like a better match to me.
Good day!
I am having a wierd problem: QNAM sends my SECOND request twice. I am not sure how to reproduce the problem (what are actual prerequisites), but I have the code that will demonstrate it 100% of the time. I can also provide screenshot of HTTP sniffer catching those requests. You can see that the request I send at code line 42 effectively gets duped, but the one before and one after (not shown) are sent fine (once)...
My problem is similar to the one shown in this question.
However...
Main differences between that question and mine are:
I am using QNAM in an asynchronous manner with the help of Qt's Signals and slots
I am sending post requests instead of get.
What could be the problem? Is there any way to make it work as it's supposed to?
Thanks in advance! If you need additional info just ask :)
This can happen if the server doesn't return any content in the response. If you control the server, you can add a workaround to return some dummy content.
I just had this issue and after sending down one character in the response, I no longer see the request sent twice. This was with a BlackBerry 10 (QT) hitting an iOS device running Mongoose as the embedded server.