TwitteR setup_twitter_oauth() failing

前端 未结 11 535
忘掉有多难
忘掉有多难 2020-12-20 11:45

I was following the vignette for the package, updated and loaded all necessary packages, seemed like it would be a pretty straight-forward process to authenticate. Instead,

相关标签:
11条回答
  • 2020-12-20 12:22

    I used a different wireless network (which was less secure) and this worked for me

    0 讨论(0)
  • 2020-12-20 12:25

    The problem for me was that my curl was out-of-date, so it wasn't able to verify the SSL certificate it was receiving. All I had to do is update curl (simply conda update curl if you're using anaconda) and oauth worked perfectly after that.

    0 讨论(0)
  • 2020-12-20 12:28

    install.packages("base64enc") was what solved this issue for me.

    0 讨论(0)
  • 2020-12-20 12:31

    Try to regenerate the consumer key and access_token keys. I also faced the similar problem. Nothing resolved my problem. But after I regenerated the keys and used the new keys its resolved and works beauty.

    0 讨论(0)
  • 2020-12-20 12:36

    I tried all the suggestions here but surprisingly none worked for me. Somebody could be going through the same situation as I did so I answer with what worked for me- it seems that the problem was with direct authentication, so I followed the following steps(this requires one to have the openssl package) installed and loaded along with the twitteR package;

    Ensure you have created your twitter API and have the consumerkey and consumerSecret codes, and preferably remain logged into twitter with your default web browser

    packages <- c("twitteR", "openssl")
    ### checking if packages are already installed and installing if not
    for(i in packages){
        if(!(i %in% installed.packages()[, "Package"])){
            install.packages(i)
        }
    library(i, character.only = TRUE) ## load packages
    }
    
    setup_twitter_oauth(consumer_key, consumer_secret) ## do not input the access_token and access_secret
    

    This is going to open up your default browser with the successful authentication message. You can close the browser now and continue exploring tweets with R.

    0 讨论(0)
  • 2020-12-20 12:38

    Faced the same problem. Then realized that I was not logged into Twitter (from default browser). Logged in to Twitter and everything worked perfectly.

    0 讨论(0)
提交回复
热议问题