Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

get_timelines Error: API did not return json #433

Closed
ManuelaGonzalez opened this issue Jul 15, 2020 · 1 comment
Closed

get_timelines Error: API did not return json #433

ManuelaGonzalez opened this issue Jul 15, 2020 · 1 comment

Comments

@ManuelaGonzalez
Copy link

Problem

I have been using get_timelines function for one day without a problem but I now get get an error message, I restarted R but the problem continues , provided examples with my Twitter user but also happens with others I have tried.
Noticed the problem has been reported before here but did not find anything to suggest how I may fix it, apologies if I overlooked something

Expected behavior

to have timeline output for that user

Reproduce the problem

out = get_timelines(user = "MGS_tweets",
                    n = 3200,
                    parse = T)

Error: API did not return json
### rtweet version0.7.0

Session info

R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rtweet_0.7.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4       fansi_0.4.0      crayon_1.3.4     assertthat_0.2.0 later_0.7.5      R6_2.3.0         lifecycle_0.2.0 
 [8] jsonlite_1.6.1   magrittr_1.5     pillar_1.4.3     httr_1.4.1       cli_2.0.2        rlang_0.4.6      curl_3.2        
[15] rstudioapi_0.11  promises_1.0.1   vctrs_0.3.1      ellipsis_0.3.0   tools_3.6.1      glue_1.3.0       httpuv_1.4.5.1  
[22] yaml_2.2.0       compiler_3.6.1   pkgconfig_2.0.2  openssl_1.1      tibble_3.0.0    ```

### Token
<Token>
<oauth_endpoint>
 request:   https://api.twitter.com/oauth/request_token
 authorize: https://api.twitter.com/oauth/authenticate
 access:    https://api.twitter.com/oauth/access_token
<oauth_app> rstat
  key:    6j7Ig4
  secret: <hidden>
<credentials> oauth_token, oauth_token_secret, user_id, screen_name

``` r
## copy/paste output
rtweet::get_token()
@Arf9999
Copy link

Arf9999 commented Jul 31, 2020

The solution to this seems to be to specify your token in the call :

out = get_timelines(user = "MGS_tweets",
                    n = 3200,
                    parse = T,
                    token = whatever_your_token_is_called_in_environment)

@llrs llrs mentioned this issue Feb 15, 2021
@llrs llrs closed this as completed Feb 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants