-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error reading from connection #20
Comments
Can you include the code you used? This error is typically due to an incorrect path passed to W/o more code to replicate, my advice is to install the newest version of rtweet ## install newest version of rtweet
install.packages("rtweet") Check to make sure it's at least version packageVersion("rtweet")
[1] '0.6.8' Then, to make sure rtweet gets configured correctly, wipe any ## wipe twitter_pat env var
Sys.setenv(TWITTER_PAT = "")
## search via rtweet
rt <- rtweet::search_tweets("lang:en") That should pop-up a window asking you to authorize the rstats2twitter (rtweet) client, which will enable rtweet to send API requests on your behalf (which {{tweetbotornot}} uses to gather data it needs to generate estimate) |
Hi MIchael,
Thank you for responding!
It turns out I had not followed the right authentication process - I had
set up a token for a different application and assumed it would work.
After I set up the authentication for rtweet, I followed your instructions
and the botornot command seemed to be running; however, I receive this
error message:
Error in textfeatures::textfeatures(x, normalize = FALSE, word_dims = 0) :
unused arguments (normalize = FALSE, word_dims = 0)
Here's my code:
library(tweetbotornot)
library(rtweet)
packageVersion("rtweet")
consumer_key <- "pnQmvgyUKbmedb1OZhSv6xbih"
consumer_secret <- "V7FNEkTSGKvMChgK4OqVms9r15Q7hrQDwDhu5OPQVnl5IhJL2r"
access_token <- "911645742-jL1RAmUR5DkzWq3LK33iUAL5FtplY3eRN4p0dI1V"
access_secret <- "tStF3lbCSoAdThH4mHXvwRk3U1cZjbX221GCKot351TMy"
token <- create_token(
app = "my_twitter_research_app",
consumer_key,
consumer_secret,
access_token,
access_secret)
## search via rtweet works!
rt <- rtweet::get_my_timeline(n=100)
rt <- rtweet::search_tweets("GMO", n=100)
#Test username for bot score
botornot("AlertTrade")
I did not try the command with the vector of usernames, but here's the
syntax for that:
users <- as.vector(Neg$Author)
users[1:5] #returns correctly the names as a vector
Thank you for helping on this, I'm really curious to run your test! By the
way, is there a limit to the number of usernames that can be tested at once?
Elena
Il giorno gio 4 ott 2018 alle ore 17:16 Michael W. Kearney <
[email protected]> ha scritto:
… Can you include the code you used? This error is typically due to an
incorrect path passed to readRDS(), which would have to be from either
(a) when you read in your vector of screen names or (b) when rtweet
<https://github.com/mkearney/rtweet> tried to read your token.
W/o more code to replicate, my advice is to install the newest version of
rtweet
## install newest version of rtweet
install.packages("rtweet")
Check to make sure it's at least version 0.6.8
packageVersion("rtweet")
[1] '0.6.8'
Then, to make sure rtweet gets configured correctly, wipe any TWITTER_PAT
environment variables and do a quick search:
## wipe twitter_pat env var
Sys.setenv(TWITTER_PAT = "")
## search via rtweetrt <- rtweet::search_tweets("lang:en")
That should pop-up a window asking you to authorize the rstats2twitter
(rtweet) client, which will enable rtweet to send API requests on your
behalf (which *{{tweetbotornot}}* uses to gather data it needs to
generate estimate)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/And07IuFlb3rdzlPQjNHaHrxxKbsUHa8ks5uhnrFgaJpZM4XIjNH>
.
|
Im getting the same error: Error in textfeatures::textfeatures(x, normalize = FALSE, word_dims = 0) : Any idea @mkearney ? |
btw im using 3.5.1 version of R |
I will report this on another issue since it's another problem and seems to be recent. |
Hi, I have the same problem: I thing this isn't problem with token. For userTimeline() function I have good results: userTimeline("realdonaldtrump", n = 10) R version 3.5.1 (2018-07-02) -- "Feather Spray" |
Hi guys, consumer_key <- "xxxxxxxxxxxxxxxxxxxx" It's work for twitterR package. But for tweetbotornot you must use: if (!requireNamespace("httpuv", quietly = TRUE)) { identical(twitter_token, get_token()) |
I've downloaded the package and attempted to run it on a vector of usernames, but I get an error result:
Error in readRDS(x) : error reading from connection
The text was updated successfully, but these errors were encountered: