guidone / node-red-contrib-chatbot

Visually build a full featured chat bot for Telegram, Facebook Messenger, Whatsapp and Slack with Node-RED. Almost no coding skills required.
http://red-bot.io
933 stars 189 forks source link

Persistent Menu - Facebook #53

Closed ram1505 closed 7 years ago

ram1505 commented 7 years ago

Hi, How can I get the facebook persistent menu working with chatbot?

guidone commented 7 years ago

@ram1505 At the moment is not possible, but I'm working on it

guidone commented 7 years ago

@ram1505 I have a beta for this, would you like to try?

npm install node-red-contrib-chatbot@0.6.21-beta-1

Thanks!

ram1505 commented 7 years ago

Sure. Let me try it out and will feedback to you. Thanks.

ram1505 commented 7 years ago

in order to test this, I need this to be resolved.

ram1505 commented 7 years ago

I tried this version. I am unable to get it show up on the Messenger. Not sure how to connect this in Node-RED. Should I connect this directly between the Facebook Receiver & Sender or should I connect it to a Text?

ram1505 commented 7 years ago

I'm getting some errors like this when I try the menu with messenger:

node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Unable to prepare unknown message type (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error parsing error payload from Facebook. (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): Unable to prepare unknown message type (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error parsing error payload from Facebook. (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Unable to prepare unknown message type (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error parsing error payload from Facebook. (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): Unable to prepare unknown message type (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): Error parsing error payload from Facebook. (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 11): Unable to prepare unknown message type (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 12): Error parsing error payload from Facebook. (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 13): Unable to prepare unknown message type (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 14): Error parsing error payload from Facebook. (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 15): Unable to prepare unknown message type (node:1801) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 16): Error parsing error payload from Facebook.

guidone commented 7 years ago

@ram1505 should be connected to a Facebook Sender node

guidone commented 7 years ago

@ram1505 ok I've fixed some bugs

npm install node-red-contrib-chatbot@0.6.21-beta-2
ram1505 commented 7 years ago

Awesome! Works like a charm!

ram1505 commented 7 years ago

One issue is that, the persistent menu seems super persistant that I can no longer remove it from my bot even after deleting the chatbot menu node. How can I remove the menu items from my facebook messenger now?

guidone commented 7 years ago

@ram1505 yes menu in stored on Facebook server, have you tried with a menu node with no elements inside?

ram1505 commented 7 years ago

I actually used the Facebook's CURL method with empty call to action and it removed the menu.