Difference between revisions of "R: twitter persiapan"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (Created page with " install.packages(c("devtools", "rjson", "bit64", "httr")) #RESTART R session! library(devtools) install_github("twitteR", username="geoffjentry") library(twitteR)...") |
Onnowpurbo (talk | contribs) |
||
| Line 6: | Line 6: | ||
library(devtools) | library(devtools) | ||
| − | install_github("twitteR", username="geoffjentry") | + | install_github("geoffjentry/twitteR", username="geoffjentry") |
library(twitteR) | library(twitteR) | ||
| + | |||
| + | |||
| + | api_key <- "YOUR API KEY" | ||
| + | api_secret <- "YOUR API SECRET" | ||
| + | access_token <- "YOUR ACCESS TOKEN" | ||
| + | access_token_secret <- "YOUR ACCESS TOKEN SECRET" | ||
| + | setup_twitter_oauth(api_key,api_secret) | ||
| + | |||
| + | searchTwitter("android") | ||
| + | |||
Revision as of 10:25, 1 November 2018
install.packages(c("devtools", "rjson", "bit64", "httr"))
#RESTART R session!
library(devtools)
install_github("geoffjentry/twitteR", username="geoffjentry")
library(twitteR)
api_key <- "YOUR API KEY" api_secret <- "YOUR API SECRET" access_token <- "YOUR ACCESS TOKEN" access_token_secret <- "YOUR ACCESS TOKEN SECRET" setup_twitter_oauth(api_key,api_secret)
searchTwitter("android")