Created
October 31, 2018 08:24
-
-
Save isdaviddong/87eb70749457c49e24380484350f1290 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //回覆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