Created
August 3, 2020 13:55
-
-
Save isdaviddong/b537a8c4507ff10bbf07bde4d4aad3f7 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
| using System; | |
| using System.Collections.Generic; | |
| namespace linepushtest | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var AdminUserId = "___AdminUserId___"; | |
| var ChannelAccessToken = "___ChannelAccessToken___"; | |
| var bot = new isRock.LineBot.Bot(ChannelAccessToken); | |
| var flexContents = @" | |
| ___Replace__All__This__With__FLEX__MESSAGE__SIMULATOR__JSON | |
| "; | |
| //定義一則訊息 | |
| var Messages = @" | |
| [ | |
| { | |
| ""type"": ""flex"", | |
| ""altText"": ""This is a Flex Message"", | |
| ""contents"": $flex$ | |
| } | |
| ] | |
| "; | |
| //發送 | |
| bot.PushMessageWithJSON( | |
| AdminUserId, | |
| Messages.Replace("$flex$", flexContents)); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment