Last active
January 5, 2017 16:58
-
-
Save white5168/2a85433bb762a92a2d9f6967cb9b4ced to your computer and use it in GitHub Desktop.
This file contains 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
library(httr); | |
picurl <- "http://www.ccf.org.tw/new/endpoverty/images/product/product-pic1.jpg" | |
url <- "https://notify-api.line.me/api/notify" | |
message <- "中文測試~!@#$%^&*()123456789" | |
token <-"Bearer 你的Token" | |
postdata <- list("message"=message, | |
"imageThumbnail"=picurl, | |
"imageFullsize"=picurl, | |
"stickerPackageId"="1", | |
"StickerId"="106") | |
header <- add_headers("Authorization"=token) | |
req <- POST(url, header, body = postdata, encode="form") | |
status <- content(req , as ="text", encoding="utf-8") | |
status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment