2

我一直在尝试通过 CURL 将我的消息放入松弛通道,并且还具有与 IFTTT 发送的消息相同的格式。我可以让消息发布,但我无法像 IFTTT 发送时那样让缩略图出现在消息的右侧。由于我没有足够的声誉将图片附加到这篇文章中,因此很难解释这一点。我一直在尽我所能,但我无法弄清楚这一点。

这是我根据检查 IFTTT 发送给 slack 的代码时能够找到的内容所尝试的。

curl -X POST --data-urlencode 'payload={"channel":"#testapi","username":"IFTTT","icons": {"image_48":"https://slack.global.ssl.fastly.net/20653/img/services/ifttt_48.png"},"attachments":[{"title":"Cloudy today!","title_link":"http://www.weather.com/weather/5-day/USOH0251","thumb_url":"http://ifttt.com/images/weather/cloudy.png","thumb_width":310,"thumb_height":310,"text":"Cloudy today! With a high of 34F and a low of 25F.","fallback":"Cloudy today! With a high of 34F and a low of 25F.","mrkdwn_in":["text","pretext"]}],"mrkdwn":true,"type":"message","subtype":"bot_message","ts":"1415874505.000002"}' https://hooks.slack.com/services/0000000/00000000/00000000

当我尝试相同的所有帖子时,但右侧的缩略图不会出现。

任何帮助将非常感激。

4

0 回答 0