Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func main() {
- line := &lineMessenger{
- channelID: "<line-channel-id>",
- channelSecret: "<line-channel-secret>",
- }
- if !line.accessTokenExists() {
- err := line.issueAccessToken()
- if err != nil {
- log.Fatal(err)
- }
- }
- err := line.sendTextMessage("<line-user-id>", textMessages{
- newTextMessage("Hello, world!"),
- })
- if err != nil {
- log.Fatal(err)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement