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
2
votes
1 answer

Why is Rtweet's parse_stream() function returning a NULL object?

I have a series of .json files each containing data captured from between 500 and 10,000 tweets (3-40 MB each). I am trying to use rtweet's parse_stream() function to read these files into R and store the tweet data in a data table. I have tried the…
G-Lomax
  • 61
  • 6
2
votes
2 answers

How to remove empty tibbles from a list of tibbles returned by get_friends function?

I am using the get_friends function of rtweet package to get the list of user_id's of the friends of a set of focal users who are sampled from participants in a Twitter discourse. The function returns a list of tibbles. Each tibble has two columns…
Sunil Reddy
  • 45
  • 1
  • 7
2
votes
1 answer

Get users tweets excluding retweets using tweepy cursor

I want to extract exactly 400 tweets for each user whose id is in a list. I am doing this using Tweepy and Cursor and my code looks like the following: for user_id in users: for tweet in tweepy.Cursor( api.user_timeline, …
GRoutar
  • 1,311
  • 1
  • 15
  • 38
2
votes
2 answers

Unable to create token with rtweet package

I am not able to create a twitter token using create_token from rtweet package: library (rtweet) twitter_token <- create_token(app = appname, # as set in Twitter API consumer_key = key, # as set in Twitter API …
Fabio Correa
  • 1,257
  • 1
  • 11
  • 17
2
votes
1 answer

R Find all replies to a user's tweets from their follower list

I'm trying to find out the number of replies for all given tweets by a user. This is not something avaiable directly from Twitter's API. I've decided to only go after replies from a user's followers, to help distill down the data generated and as a…
Peter
  • 107
  • 1
  • 9
2
votes
0 answers

Create function to pull all replies to tweets from followers in R

I'm sure everyone is aware of the limitations with Twitter's API and the inability to get the number of replies a given tweet has. I'm after this information, and am trying to loop over all the followers for a given account and look back at all the…
Peter
  • 107
  • 1
  • 9
1
vote
1 answer

Using the new tweet_post in rtweet - but with media

The new Twitter v2 is a major pain. I really hate that I have to re-authorize every two hours with Oauth2, which means that I can't tweet auto-generated charts once a day unless I happen to be sitting by my computer to re-authorize. But I…
1
vote
1 answer

Twitter Setup for R / rtweet

Folks, I'm attempting to set up automated posts to Twitter with R and rtweet. I'm following the steps outlined at https://cran.r-project.org/web/packages/rtweet/vignettes/auth.html, and I'm hitting a roadblock. Backdrop: I used to have an automated…
PMaier
  • 592
  • 7
  • 19
1
vote
0 answers

Is it possible to still use rtweet R package to retrieve tweets from Twitter

I have made an app that retrieves tweets using the function rweet::get_timeline (in the rtweet package). The app suddenly stopped working with the following error message: Warning: Error in : Twitter API failed [403]. Check error message…
madsR
  • 95
  • 6
1
vote
0 answers

Get quote tweets and correct retweets with rtweet library

tweet_status_id <- "1594049106615291907" tweet_retweeter_ids <- rtweet::get_retweeters(status_id = tweet_status_id) tweet_retweets <- rtweet::get_retweets(status_id = tweet_status_id, n =…
Canovice
  • 9,012
  • 22
  • 93
  • 211
1
vote
1 answer

Trying to retrieve tweets from twitter, but unidentified error occurs

I am trying to retrieve tweets from twitter on a full archive basis. However, I finally managed to work things out on my developer page, but the code seems to stumble upon an error that I can not find anywhere on the internet. This is my code…
1
vote
0 answers

Error accessing tweets using search_fullarchive rweet package function

So, I'm trying to do some twitter scraping for my Doctorate Dissertation and I keep getting an error from the rtweet package. install.packages("rtweet") library(rtweet) api_key <- " " api_secret_key <- " " access_token <- " " access_token_secret <-…
1
vote
1 answer

search_fullarchive with rtweet on elevated (or academic) account refused by Twitter API

I need to use the rtweet search_fullarchive to access historical data. I have two developer accounts: one is elevated and the other is academic. This stackoverflow suggested Academic had not been given elevated access, so I primarily used the…
user72847
  • 23
  • 5
1
vote
1 answer

Rtweet loop for get_timeline and users_data for a list of Twitter accounts

I'm looking to pull Tweets for a large list of accounts. In the recent Twitter API update, user_id and screen name associated with a Tweet aren't pulled automatically. Instead, you have to pull Tweets with get_timeline and then pull user information…
cianna
  • 43
  • 2
1
vote
0 answers

Rtweet get_timeline no longer showing user_id or screen_name

I am looking to pull a set of Tweets for multiple users, the rtweet package. When I have used the get_timeline() function previously, the output has included the user_id and screen_name of the account. This is particularly important when pulling…
cianna
  • 43
  • 2
1
2
3
13 14