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 with users_data. This is fine, HOWEVER, the users_data function appears to only pull information for one user at a time.
For example, get_timeline is able to pull Tweets for both accounts
accounts <- c("BarackObama", "justinbieber")
timelines <- get_timeline(accounts, n = 100, token = auth, retryonratelimit = TRUE)
But when I apply the users_data function it only pulls in the info for the first account "BarackObama"
users_timelines <- users_data(timelines)
Any ideas for a workaround? My ideal is to have a data frame with Tweets from each account and a column added for user name and user id. There may be for a potential for a function that loops through each account, pulls the user timeline, pulls the users_data for and then combines them all into one data frame, but I am not sure how to approach that.