Questions tagged [rtweet]

Questions about the R package for interacting with Twitter's API

An implementation of calls designed to extract and organize Twitter data via Twitter’s REST and stream API’s. Functions formulate GET and POST requests and convert response objects to more user friendly structures, e.g., data frames or lists. Specific consideration is given to functions designed to return tweets data from searches, streams, and timelines and user ids from friends and followers lists. More info: rtwitter reference manual.

198 questions
1
vote
0 answers

Get timeline method in rtweet package returns this error: Error: API did not return json

I am trying to get timeline using rtweet package. Search tweet is working but get timeline is not working. Here is my code: tweet_msnbc = get_timeline(user = 'MSNBC', n=2000) It returns: Error: API did not return json It worked just last night.…
Rashida
  • 401
  • 7
  • 18
1
vote
1 answer

get_timeline with rtweet and max. tweet number

I'm currently using the Standard Twitter API for my bachelor degree. So i wanna analyze the timeline of certain users. My problem is, that i'm want more than 3200 Tweets with the get_timeline command. So i set up following code in R: df1 <-…
Fade
  • 59
  • 5
1
vote
1 answer

RStudio: Only showing results of previous code

I am working on a sentiment analysis on Twitter, using rtweet package on Rstudio. At first, I wanted to get 1000 tweets from Twitter using this function from rtweet package which worked fine: Onlinesc <- search_tweets("online schooling", n=1000,…
Maryam
  • 11
  • 2
1
vote
0 answers

rtweet Advanced Streaming Questions

I am new to the rtweet package and have versions of the same question related to queries passed to POST statuses/filter. Per Twitter, "The default access level allows up to 400 track keywords, 5,000 follow userids and 25 0.1-360 degree location…
ZacharyST
  • 658
  • 2
  • 6
  • 22
1
vote
0 answers

How do I collect Twitter lists_memberships from several users in R?

I would like to get the names of the lists a Twitter user is a member of. I can do this one by one: nytimes <- lists_memberships("nytimes", n = 1000, cursor = "-1", filter_to_owned_lists = FALSE, parse = TRUE, token = NULL) But I'd like to do…
J001
  • 15
  • 4
1
vote
1 answer

How to incorporate a regular expression in R in combination with sprintf(%s)?

I'm using some old code I found to take character strings (ex:) [1] "Indianapolis, IN" "Columbia, TN" "Chicago, IL" "Next door to Florida Man" [5] "Holeintheroad, TN" "RUCH 11 LISTOPADA" and find which…
inh2102
  • 11
  • 1
1
vote
1 answer

time zone not working when plotting tweets with rtweet's ts_plot()

there is a closed issue on rtweet's GitHub saying that you could use tz in ts_plot https://github.com/ropensci/rtweet/issues/227 rt <- search_tweets("rstats", n = 500) ## with default timezone (UTC) ts_plot(rt, "hours") ## with american central…
djpeluca
  • 113
  • 1
  • 5
1
vote
0 answers

How to define search queries in rtweet fullarchive and 30day search

It's not in the Rtweet-documentation how to do this properly with the additional operators available for search_fullarchive and search_30days. It just says that the string should follow directly after the operator: , for example: place:California.…
d_fornis
  • 29
  • 3
1
vote
0 answers

extracting the first retweets after a tweet's publication

I try to extract "retweet cascades" from twitter, i.e. I want to chose a certain tweet and then extract its retweets. I know about the function get_retweets(), however this function only extracts the most recent retweets, while I want to have the…
mathology
  • 147
  • 4
1
vote
0 answers

Rtweets authentication issue

I work with the fantastic Rtweet package for ad hoc analyses. I am teaching a workshop on some functionality and tried removing my authentication to show the entire process from start to finish by removing TWITTER_PAT from the my Renviron. The…
macworthy
  • 95
  • 8
1
vote
1 answer

rtweet "search_tweets" function does not return coordinates

I'm using the rtweets library (search_tweets function) to retrieve data from twitter. All data is present except location data, for which I just get "NA". What's even weirder is occasionally I do get coordinates (but very infrequently).…
1
vote
0 answers

Twitter stream disconnects prematurely with R package rtweet

I am trying to download a live stream of tweets using the r package {rtweet}. Seems when I use hashtags that are not popular I get the following message: Streaming tweets for 600 seconds... The stream disconnected prematurely. Reconnecting... When…
mdb_ftl
  • 423
  • 2
  • 14
1
vote
0 answers

Is there a min_id equivalent for max_id in rtweet's get_timeline?

I'm using the twitter api and setting it up to collect Twitter information regularly. I'd like to avoid collecting tweets that I already have for a given user. I know that rtweet's max_id function allows you to collect only tweets older than a given…
A. Huberts
  • 53
  • 1
  • 5
1
vote
1 answer

Using Rtweet's search_fullarchive in R

I am trying to use rtweet's search_fullarchive using my premium token registered at Twitter Developer. However, I got an error message of: Warning: list(message = "Forbidden: Authentication succeeded but account is not authorized to access this…
superzubs
  • 31
  • 5
1
vote
2 answers

Downloading historical Tweets via rtweet from Premium API via R

I need to extract the Tweets with "#bitcoin" from 2013-04-28 until today from Twitter to do a sentiment analysis. For this I have access to Twitter's Premium API. I am using the rtweet package which offers the function search_fullarchive. My…
StableSong
  • 79
  • 11