6

我一直在尝试通过连接器将卡片发送到 Teams 频道。卡片确实出现了,但我尝试发送的任何英雄形象都没有显示。Message Card Playground正确显示图像,但它根本不显示在 Teams 中。我对“正常”图像没有任何问题。

这是我通过 webhook 发送的 JSON,但我也尝试了 Twitter - Hero 图像示例卡,但它也不起作用:

{
  "@type": "MessageCard",
  "@context": "http://schema.org/extensions",
  "summary": "Hero card testing",
  "title": null,
  "text": null,
  "themeColor": "19b5fe",
  "sections": [
    {
      "title": null,
      "activityImage": "https://pbs.twimg.com/profile_images/862653089916096512/ljJwcmFp_bigger.jpg",
      "activityTitle": "Hero image card",
      "activitySubtitle": "This is a test",
      "facts": [],
      "text": null,
      "heroImage": {
        "image": "https://pbs.twimg.com/media/DFv74A0XkAEdwQ_.jpg"
      },
      "images": []
    }
  ]
}

我错过了什么吗?

4

3 回答 3

6

我遇到了同样的问题。它看起来像是一种解决方法,您可以在非部分的文本中使用内联图像降价语法。

{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "summary": "Summary",
    "title": "Title",
    "text": "![Alt text for the image](https://pbs.twimg.com/media/C8NK1XGUIAA-CJK.jpg)",
    "themeColor": "E81123"
}

我将其描述为一种解决方法,因为图像在显示时不会以任何方式缩放。正如您从这个示例中看到的那样,一个大图像非常大并且溢出了容器。

于 2017-07-29T18:32:58.390 回答
3

Teams 目前不支持 HeroImage。这是积压的,但此时没有预计到达时间。

于 2017-07-29T13:23:09.133 回答
0

当前仅在 Outlook 中支持英雄图像 ('heroImage')。将来某个时候将在 Teams 中可用。

带有英雄形象的卡片

在卡片游乐场尝试示例 Twitter 标记:https ://aka.ms/messagecardplayground

于 2017-11-14T01:42:39.677 回答