Created
August 3, 2020 14:24
-
-
Save isdaviddong/cb417ba6d95242d0410fe8c3fb308d39 to your computer and use it in GitHub Desktop.
PushLineImageMap.cs
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
| using System; | |
| using System.Collections.Generic; | |
| namespace imagemaptest | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var AdminUserId = "___AdminUserId___"; | |
| var ChannelAccessToken = "___ChannelAccessToken___"; | |
| var bot = new isRock.LineBot.Bot(ChannelAccessToken); | |
| //傳送訊息 | |
| var text = new isRock.LineBot.TextMessage("test"); | |
| var Img1 = new isRock.LineBot.ImagemapMessage(); | |
| Img1.baseSize = new System.Drawing.Size(1040, 1040); | |
| Img1.baseUrl = new Uri("https://i.imgur.com/eeGLJ3I.jpg"); | |
| Img1.actions.Add(new isRock.LineBot.ImagemapUriAction() | |
| { | |
| linkUri = new Uri("http://www.isrock.com.tw"), | |
| area = new isRock.LineBot.ImagemapArea(0, 0, 100, 100) | |
| }); | |
| //發送 | |
| bot.PushMessage(AdminUserId, Img1); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ក្រសួងសាធារណការ និងដឹកជញ្ជូន
Ministry of Public Works and Transport