Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使rfacebook代码从命令行工作?_R_Facebook Graph Api_Command Line - Fatal编程技术网

如何使rfacebook代码从命令行工作?

如何使rfacebook代码从命令行工作?,r,facebook-graph-api,command-line,R,Facebook Graph Api,Command Line,我想使用R加载facebook帖子并分析它们,所有这些我都想在服务器上完成,所以当我在终端中运行以下代码时: library("Rfacebook") library("httr") fb_oauth <- fbOAuth(app_id="appid", app_secret="secret") save(fb_oauth,file = "fb_oauth") load("fb_oauth") fb_page <- getPage(page="facebook", token=fb_

我想使用R加载facebook帖子并分析它们,所有这些我都想在服务器上完成,所以当我在终端中运行以下代码时:

library("Rfacebook")
library("httr")
fb_oauth <- fbOAuth(app_id="appid", app_secret="secret")
save(fb_oauth,file = "fb_oauth")
load("fb_oauth")
fb_page <- getPage(page="facebook", token=fb_oauth)
## Getting posts on Humans of New York page, including posts by others users
## (not only owner of page)
token = "mythoken"
page <- getPage(page="humansofnewyork", token=token, feed=TRUE)
但在Rstudio中,它是有效的。如何使其在服务器上工作?

该函数的代码是,创建一个
fbOAuth2
函数,从中删除
不可见(readLine(message))
。不过,如果以后不使用浏览器身份验证,您可能无法逃脱
http://localhost:1410/ 
When done, press any key to continue...
Error: oauth_listener() needs an interactive environment.
Execution halted