我想用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)
我收到以下错误: 复制并粘贴到Facebook App Settings上的站点URL:
http://localhost:1410/
When done, press any key to continue...
Error: oauth_listener() needs an interactive environment.
Execution halted
但在Rstudio中,它有效。我如何才能在服务器上运行?