Reputation: 238
I implemented a Herocard with a CardAction.call
button as shown in the snippet below but it only works (displays) on the Website channel. It doesn't show at all on Messenger (see screenshots attached).
var card = new builder.HeroCard(session)
.title(places[session.dialogData.mealType][choicePlaceId][0])
.subtitle(places[session.dialogData.mealType][choicePlaceId][1])
.text(places[session.dialogData.mealType][choicePlaceId][3])
.buttons([
builder.CardAction.call(session, '+210123456789', 'Call')
]);
var msg = new builder.Message(session).addAttachment(card);
session.send(msg);
Web Chat Channel:
FB Messenger Channel:
Upvotes: 1
Views: 328
Reputation: 3549
Use the "openUrl" type and the value in "tel:xxxxxxxxx" format. It works for me.
Example:
var card = new builder.HeroCard(session)
.title(places[session.dialogData.mealType][choicePlaceId][0])
.subtitle(places[session.dialogData.mealType][choicePlaceId][1])
.text(places[session.dialogData.mealType][choicePlaceId][3])
.buttons([
builder.CardAction.openUrl(session, 'tel:+210123456789', 'Call')
]);
Upvotes: 1
Reputation: 51
The Call action is only available on Skype, not on Facebook Messenger
Upvotes: 1