2
$\begingroup$

I'd install an R package twitterR in my RStudio for accessing Twitter data for a particular handle. But whenever I do try to access the Twitter data it's showing me an unexpected message:

In doRppAPICall(“search/tweets”, n, params = params, retryOnRateLimit = retryOnRateLimit, :
100 tweets were requested but the API can only return 0

Any thoughts on that?

I tried different parameters, handles and functionalities but still getting the same issue.

Here's my code for the particular functionality--

my_tweets <- searchTwitter('@jabhij', geocode='20.593684, 78.96288, 2000km', n = 100)
my_tweets_df <- do.call("rbind", laaply(my_tweets, as.data.frame))
View(my_tweets_df)

Any thoughts on that will be very helpful. Cheers! :)

$\endgroup$
0

2 Answers 2

1
$\begingroup$

It's because of the whitespace in the parameter for geocode.

It should be:

my_tweets <- searchTwitter('@jabhij', geocode="20.593684,78.96288,2000km")
$\endgroup$
0
0
$\begingroup$

Had the same issue. Your parameters are in the wrong order, place n before geocode. You must also avoid any whitespace within the geocode.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.