【发布时间】:2017-05-19 08:16:04
【问题描述】:
我尝试使用此代码从我的 R 控制台发布推文
library("RCurl")
opts <- curlOptions(header = FALSE,
userpwd = "username:password", netrc = FALSE)
tweet <- function(status){
method <- "http://twitter.com/statuses/update.xml?status="
encoded_status <- URLencode(status)
request <- paste(method, encoded_status, sep = "")
postForm(request,.opts = opts)
}
tweet("This tweet comes from R! #rstats")
但是得到这个错误:raw(0) 警告: 在 postForm(request, .opts = optss) 中:没有输入传递给表单。
有人可以帮助我吗?在http://blog.revolutionanalytics.com/2009/06/tweeting-from-r.html找到代码
非常感谢
【问题讨论】: