Difference between revisions of "R: twitter persiapan"

From OnnoWiki
Jump to navigation Jump to search
(Created page with " install.packages(c("devtools", "rjson", "bit64", "httr")) #RESTART R session! library(devtools) install_github("twitteR", username="geoffjentry") library(twitteR)...")
 
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
  install.packages(c("devtools", "rjson", "bit64", "httr"))
 
  install.packages(c("devtools", "rjson", "bit64", "httr"))
 
 
 
  #RESTART R session!
 
  #RESTART R session!
 
 
 
  library(devtools)
 
  library(devtools)
  install_github("twitteR", username="geoffjentry")
+
  install_github("geoffjentry/twitteR", username="geoffjentry")
 
  library(twitteR)
 
  library(twitteR)
 +
 +
#
 +
# request ke https://apps.twitter.com/
 +
#
 +
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")
 +
  
  

Latest revision as of 10:47, 1 November 2018


install.packages(c("devtools", "rjson", "bit64", "httr"))
#RESTART R session!
library(devtools)
install_github("geoffjentry/twitteR", username="geoffjentry")
library(twitteR)
#
# request ke https://apps.twitter.com/
#
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")


Pranala Menarik