我一直在尝试通过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
当我尝试相同的所有帖子时,但不会出现右侧的缩略图。
任何帮助都会非常感激。