Facebook's Authenticating and Message-received events
Hi,
I'm using this Send to Facebook plugin and, according to Facebook's documentation, it is supposed to send an "Authentication" callback.
How can I listen for this event on my bot? It doesn't come through as a message. And I've tried adding a listener for these events, with no sucess:
['error', 'quit', 'DeleteUserData', 'BotAddedToConversation', 'BotRemovedFromConversation', 'UserAddedToConversation', 'UserRemovedFromConversation', 'EndOfConversation']
Thank you in advance!
Adding Tom... I believe the only webhook we currently intercept is "Message Received" but Tom can verify. At this point you'd probably need to add logic to your bot to handle the "Authentication" callback.
Okay, I suppose I could do that. However, I don't receive any messages other than type: "Message". Is there another way to listen to these?
No @matheus208 you're right. We have to pass these through. We'll take a look.
You should now receive a message for auth, look in the channeldata
Cheers! That's awesome!
Is there a way this can be added as a separate message type? I am currently catching it through the normal ("Message") flow. Since the payload from Facebook doesn't match any of the regexes for my dialogs, it ends up being treated on the "onDefault" hook.
I'm just afraid that the payload might change and accidentally match with any of the regexes, resulting in odd behaviour.
It would be great if we could register for an "Authentication" message type, like the other ones described here
Thank you once again!