Stuck in "Redirect you back to the application. This may take several minutes." twitter authorization part - with twitteR package

I had the same problems as described in this question in which I received similar errors. But I followed the instructions, changing the callback url, and a new problem arose. I get to the authorization part through my browser, but I continue to get stuck on the download page with the warning "Redirecting you back to the application. This may take several minutes." and instead of being redirected, the browser stops and warns that it cannot get to the page - also RStudio crashes right after it. What should I do? I tried to find similar questions, but I could not find a solution.

Although this repeats itself a bit, here is the code in R:

library(twitteR)

Consumer_key <- "key"
Consumer_secret <- "secret"

setup_twitter_oauth(Consumer_key,Consumer_secret, access_token=NULL,access_secret=NULL)

[1] "Using browser based authentication"
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
+4
source share
1 answer

, node.js , , Twitter

, , .

passport.use(new TwitterStrategy({
    consumerKey: process.env.TWITTER_CONSUMER_KEY,
    consumerSecret: process.env.TWITTER_CONSUMER_SECRET,
    callbackURL: "http://127.0.0.1:8080/passport/twitter/callback"
}, function(token, tokenSecret, profile, cb) {
    // debug(token);
    // debug(tokenSecret);
    // debug(profile);
    cb(); // Was missing this line
}));
0

Source: https://habr.com/ru/post/1685989/


All Articles