Azure 使用botframework在聊天机器人中发送图片

Azure 使用botframework在聊天机器人中发送图片,azure,botframework,Azure,Botframework,我有一个使用微软botframework的聊天机器人,我的webapp在Azure上运行聊天机器人。如何返回图片作为对消息的答复。我们有使用Skype、Messenger和KiK的客户端请查看 或作为JSON: { "attachments": [ { "contentType": "image/png", "contentUrl": "https://upload.wikimedia.org/wikipedia/en/a/

我有一个使用微软botframework的聊天机器人,我的webapp在Azure上运行聊天机器人。如何返回图片作为对消息的答复。我们有使用Skype、Messenger和KiK的客户端

请查看

或作为JSON:

{
    "attachments": [
        {
            "contentType": "image/png",
            "contentUrl": "https://upload.wikimedia.org/wikipedia/en/a/a6/Bender_Rodriguez.png"
        }
    ]
}
您还可以发送富卡:

 replyMessage.Attachments = new List<Attachment>();

replyMessage.Attachments.Add(new Attachment()
{
    Title = "Bender",
    TitleLink = "https://en.wikipedia.org/wiki/Bender_(Futurama)",
    ThumbnailUrl  = "http://www.theoldrobots.com/images62/Bender-18.JPG",
    Text = "Bender Bending Rodríguez, commonly known as Bender, is a main character in the animated television series Futurama.",
    FallbackText = "Bender: http://www.theoldrobots.com/images62/Bender-18.JPG"
});
replyMessage.Attachments=newlist();
replyMessage.Attachments.Add(新附件()
{
Title=“Bender”,
标题链接=”https://en.wikipedia.org/wiki/Bender_(未来)",,
ThumbnailUrl=”http://www.theoldrobots.com/images62/Bender-18.JPG",
Text=“Bender Bending Rodríguez,俗称Bender,是动画电视连续剧Futurama中的主角。”,
FallbackText=“折弯机:http://www.theoldrobots.com/images62/Bender-18.JPG"
});
 replyMessage.Attachments = new List<Attachment>();

replyMessage.Attachments.Add(new Attachment()
{
    Title = "Bender",
    TitleLink = "https://en.wikipedia.org/wiki/Bender_(Futurama)",
    ThumbnailUrl  = "http://www.theoldrobots.com/images62/Bender-18.JPG",
    Text = "Bender Bending Rodríguez, commonly known as Bender, is a main character in the animated television series Futurama.",
    FallbackText = "Bender: http://www.theoldrobots.com/images62/Bender-18.JPG"
});