Bots AnimationCard在emulator上工作,但在Messenger上不工作

Bots AnimationCard在emulator上工作,但在Messenger上不工作,bots,botframework,chatbot,facebook-messenger-bot,Bots,Botframework,Chatbot,Facebook Messenger Bot,我正在尝试使用带有文本、GIF和按钮的机器人框架显示动画卡。它在机器人模拟器上工作得很好,但在Messenger上不显示。有什么想法吗 代码 /**Send the question with the level information if available, the index and the Math expression along with a countdown timer as GIF attachment */ let message = new builder.Message

我正在尝试使用带有文本、GIF和按钮的机器人框架显示动画卡。它在机器人模拟器上工作得很好,但在Messenger上不显示。有什么想法吗

代码

/**Send the question with the level information if available, the index and the Math expression along with a countdown timer as GIF attachment */
let message = new builder.Message(session)
    .text(level ? level + '  \n' + strings.question : strings.question, dialogData.index + 1, question.expression)
    .addAttachment(
    new builder.AnimationCard(session)
        .media([{
            profile: "image/gif",
            url: "https://media.giphy.com/media/l3q2silev6exF53pu/200w.gif"
        }])
        .buttons(buttons)
    // .toAttachment()
    )
session.send(message)
仿真器

论信使

有什么想法吗提前感谢您的建议

更新1

这是我控制台上的错误


{“error”:{“message”:“(#100)Param[elements][0][title]必须是非空的UTF-8编码字符串”,“type”:“OAuthException”,“code”:100,“fbtrace_id”:“CLEcx63w+4N”}

您需要在动画卡中包含
标题,Messenger要求所有卡都包含标题。此外,动画卡在messenger中的工作方式稍有不同,它们发送一条带有.gif的消息,然后是一张带有标题和按钮的卡,而不是像emulator中那样将它们放在一张漂亮的卡中

在您的用例中,我会使用第一行表示它是什么级别作为标题,而问题作为副标题。不过,该文本将显示在gif下方而不是上方,因此它的布局与您现在的布局略有不同

let message = new builder.Message(session)
    .addAttachment(
    new builder.AnimationCard(session)
        .title(level ? level : 'Level 0')
        .subtitle(strings.question)
        .media([{
            profile: "image/gif",
            url: "https://media.giphy.com/media/l3q2silev6exF53pu/200w.gif"
        }])
        .buttons(buttons)
    )
session.send(message)

您需要在动画卡中包含
标题
,Messenger要求所有卡都包含标题。此外,动画卡在messenger中的工作方式稍有不同,它们发送一条带有.gif的消息,然后是一张带有标题和按钮的卡,而不是像emulator中那样将它们放在一张漂亮的卡中

在您的用例中,我会使用第一行表示它是什么级别作为标题,而问题作为副标题。不过,该文本将显示在gif下方而不是上方,因此它的布局与您现在的布局略有不同

let message = new builder.Message(session)
    .addAttachment(
    new builder.AnimationCard(session)
        .title(level ? level : 'Level 0')
        .subtitle(strings.question)
        .media([{
            profile: "image/gif",
            url: "https://media.giphy.com/media/l3q2silev6exF53pu/200w.gif"
        }])
        .buttons(buttons)
    )
session.send(message)