I can't get Japanese tweets with R.

Asked 2 years ago, Updated 2 years ago, 83 views

I get an error when I try to retrieve a tweet with the following code in R.
The operating system is Windows 10 and I use Rstudio.

source code

searchTwitter(searchString="#Plan until 100", 
              n = 500,                 
              lang = "ja",             
              since = NULL,            
              until = NULL,            
              locale = NULL,           
              geocode = NULL,          
              sinceID = NULL,          
              maxID = NULL,            
              resultType="mixed",    
              retryOnRateLimit=120   
)

error

Warning message:
IndoRppAPICall("search/tweets", n,params=params, retryOnRateLimit= 
retryOnRateLimit, :
  500 tweets were requested but the API can only return 0

If you put English in searchString, there will be no error.
Also, even in Japanese, there were no errors up to 3 characters.

r twitter windows-10

2022-09-30 11:01

1 Answers

 iconv ("#Planning up to 100", "CP932", "UTF-8")


2022-09-30 11:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.