[X] The behaviour of the program is deviated from what is described in the documentation.
[X] I can reproduce this problem for more than one time.
[ ] This is NOT a 3-digit error -- it does not display an error message like something went wrong. Status code: 400.
[X] This is a 3-digit error and I have consulted the Understanding API errors vignette and the suggestions do not help.
Describe the bug
I am running the get_all_tweets() function but getting the error code:
Error in make_query(url = endpoint_url, params = params, bearer_token = bearer_token, : something went wrong. Status code: 400
In addition: Warning messages:
1: Tweets will still be bound in local memory to generate .rds file. Argument (bind_tweets = FALSE) only valid when just a data path has been specified.
2: Directory already exists. Existing JSON files may be parsed and returned, choose a new path if this is not intended.
Expected Behavior
I was obviously expecting not to encounter any error in running the function: I had run the function before without problems up until encountering the error.
I have updated academictwitteR and R to the latest versions, correctly set the bearer token (i.e., checked with get_bearer(), and successfully used it with get_timeline() function from rtweets package), and tried with and without specifying the bearer token within the get_all_tweets() text.
Steps To Reproduce
Here is the code I have used (data_path obscured for privacy):
Please confirm the following
something went wrong. Status code: 400.
Describe the bug
I am running the get_all_tweets() function but getting the error code:
Error in make_query(url = endpoint_url, params = params, bearer_token = bearer_token, : something went wrong. Status code: 400 In addition: Warning messages: 1: Tweets will still be bound in local memory to generate .rds file. Argument (bind_tweets = FALSE) only valid when just a data path has been specified. 2: Directory already exists. Existing JSON files may be parsed and returned, choose a new path if this is not intended.
Expected Behavior
I was obviously expecting not to encounter any error in running the function: I had run the function before without problems up until encountering the error.
I have updated academictwitteR and R to the latest versions, correctly set the bearer token (i.e., checked with get_bearer(), and successfully used it with get_timeline() function from rtweets package), and tried with and without specifying the bearer token within the get_all_tweets() text.
Steps To Reproduce
Here is the code I have used (data_path obscured for privacy):
Acton <- get_all_tweets( users = "ActonInstitute", start_tweets = "2009-01-01T00:00:00Z", end_tweets = "2022-30-03T00:00:00Z", file = "bubba", data_path = "C:\Users\...\Data/", n=20000, bind_tweets = F )
Results do no change with different 1)Twitter handle; 2) start and end; 3) file name; 4) n of tweets; 5) datapaths; 6) page_n
Environment
R version 4.1.3 (2022-03-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19043)
Matrix products: default
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] academictwitteR_0.3.1
loaded via a namespace (and not attached): [1] fansi_1.0.3 assertthat_0.2.1 utf8_1.2.2 crayon_1.5.1 dplyr_1.0.8 R6_2.5.1 DBI_1.1.2 lifecycle_1.0.1 magrittr_2.0.3 httr_1.4.2 pillar_1.7.0 rlang_1.0.2 cli_3.2.0 curl_4.3.2
[15] fs_1.5.2 vctrs_0.4.0 generics_0.1.2 ellipsis_0.3.2 tools_4.1.3 glue_1.6.2 purrr_0.3.4 compiler_4.1.3 pkgconfig_2.0.3 tidyselect_1.1.2 usethis_2.1.5 tibble_3.1.6
Anything else?
As a potential solution, I have also forced the installation of the most recent version of academictwitteR, to no avail.
Thank you in advance for the help!