Skip to content

Instantly share code, notes, and snippets.

@isdaviddong
Created October 31, 2018 08:24
Show Gist options
  • Select an option

  • Save isdaviddong/87eb70749457c49e24380484350f1290 to your computer and use it in GitHub Desktop.

Select an option

Save isdaviddong/87eb70749457c49e24380484350f1290 to your computer and use it in GitHub Desktop.
//回覆tempalte
var actions = new List<isRock.LineBot.TemplateActionBase>();
actions.Add(new isRock.LineBot.MessageAction() { label = "標題-文字回覆", text = "回覆文字" });
actions.Add(new isRock.LineBot.UriAction() { label = "標題-Google", uri = new Uri("http://www.google.com") });
actions.Add(new isRock.LineBot.PostbackAction() { label = "標題-發生postack", data = "abc=aaa&def=111" });
var tmp = new isRock.LineBot.ButtonsTemplate()
{
text = "ButtonsTemplate文字訊息",
title = "ButtonsTemplate標題",
//設定圖片
thumbnailImageUrl = new Uri("https://arock.blob.core.windows.net/blogdata201706/22-124357-ad3c87d6-b9cc-488a-8150-1c2fe642d237.png"),
actions = actions //設定回覆動作
};
var items = new List<isRock.LineBot.MessageBase>();
items.Add(new isRock.LineBot.TextMessage("文字"));
items.Add(new isRock.LineBot.TemplateMessage(tmp));
this.ReplyMessage(LineEvent.replyToken, items);
return Ok();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment