Rtweet get_timeline no longer showing user_id or screen_name

Oh, sorry, this is a bug in rtweet: users’ data is dropped in get_timeline when multiple users are provided. I opened a bug in the repository to fix it: get_timeline for multiple users do not have all the users_data · Issue #723 · ropensci/rtweet · GitHub.

To avoid this problem until I fix it in next release I would recommend to search for each one user each time:

timeline_bo <- get_timeline("BarackObama", n = 100, token = auth, retryonratelimit = TRUE)
timeline_jb <- get_timeline("justinbieber", n = 100, token = auth, retryonratelimit = TRUE)

bo <- cbind(timeline_bo, users_data(timeline_bo)[, c("id", "id_str", "name", "screen_name")])
jb <- cbind(timeline_jb, users_data(timeline_jb)[, c("id", "id_str", "name", "screen_name")])
timeline_with_users <- rbind(bo, jb)
2 Likes