botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Facebook doesn't handle dialogAction as skype/webchat does

Open endareBrock opened this issue 9 years ago • 3 comments

NodeJS:

When sending a Card to the endpoint which includes a button with the dialogAction function. Skype and Webchat handle these functions correctly but facebook does not respond in any way.

My code to test all 3 ways of feedback. Works on skype and webchat flawless. image

Are there more people with this specific problem and/or is there a solution ?

endareBrock avatar Feb 23 '17 13:02 endareBrock

The dialogAction is technically just a postBack that creates an encoded payload of "action?add=argument" in your example. I would expect the postBack to not be working either. In general postBack support is a bit spotty but I actually thought it was working on Facebook.

In general I've started recommending people use imBack that's paired with a triggerAction() to detect the click as that should work across a wider range of channels. For example:

var bot = new builder.UniversalBot(connector, function (session) {
     var card = new builder.HeroCard(session)
          .title("test")
          .buttons([
               builder.CardAction.imBack(session, 'add argument', "add")
          ]);
     var msg = new builder.Message(session).attachments([ card ]);
     session.send(msg);
}); 

bot.dialog('addDialog', function (session, args) {
     var argument = args.intent.matched[1];
     // ... add argument ...
}).tiggerAction({ matches: /*add (.*)/I });

Stevenic avatar Feb 23 '17 23:02 Stevenic

Steven,

This worked for me thanks !

endareBrock avatar Feb 24 '17 13:02 endareBrock

Great!

Stevenic avatar Feb 24 '17 21:02 Stevenic