MS Bot Framework的呼叫按钮无法在Facebook Messenger上运行

时间:2017-02-20 17:00:01

标签: botframework chatbot facebook-messenger-bot

我使用CardAction.call按钮实现了一个Herocard,如下面的代码段所示,但它仅在网站频道上有效(显示)。它在Messenger上根本没有显示(见附件截图)。

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);

网络聊天频道:

Screenshot

FB Messenger频道:

Screenshot

2 个答案:

答案 0 :(得分:1)

使用" openUrl"类型和" tel中的值:xxxxxxxxx"格式。它对我有用。

示例:

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')
    ]);

答案 1 :(得分:0)

“呼叫”操作仅适用于Skype,而不适用于Facebook Messenger