Closed chainsawriot closed 3 years ago
It can't flip pages too.
require(academictwitteR)
#> Loading required package: academictwitteR
require(testthat)
#> Loading required package: testthat
res2 <- get_liking_users("1405327120163872777")
#> Processing 1405327120163872777
#> Total data points: 93
#> This is the last page for 1405327120163872777 : finishing collection.
## https://twitter.com/AC360/status/1405327120163872777/likes
## The post has >500 likes.
testthat::expect_gt(nrow(res2), 100)
#> Error: nrow(res2) is not strictly more than 100. Difference: -7
Created on 2021-06-17 by the reprex package (v2.0.0)
Update: the API endpoint GET /2/tweets/:id/liking_users
only returns 100 likers. So, the expected behavior is no page flipping.
Describe the bug In the doc of
get_liking_users
, it saysget_liking_users
"fetches a list of users who liked a tweet or tweets." Because of the way the function is programmed, it can't.To Reproduce
Created on 2021-06-17 by the reprex package (v2.0.0)
It has to do with this
break
statement. It breaks the for loop.