gpt4 book ai didi

r - 卡在 Twitter 授权的 "Redirecting you back to the application. This may take a few moments."部分 - 使用 twitteR 包

转载 作者:行者123 更新时间:2023-12-01 23:08:03 24 4
gpt4 key购买 nike

我遇到了与 this question 中描述的完全相同的问题,其中我遇到了类似的错误。但我按照说明进行操作,更改了回调网址,然后出现了新问题。我通过浏览器进入授权部分,但我一直卡在加载页面上,并出现警告“正在将您重定向回应用程序。这可能需要一些时间。”并且没有被重定向,浏览器停止并警告它无法访问该页面 - 而且,RStudio 在它之后立即崩溃。我应该怎么办?我尝试搜索类似的问题,但一直找不到解决方案。

虽然这有点重复,但这是 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

最佳答案

我遇到了这个问题,但在 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
}));

关于r - 卡在 Twitter 授权的 "Redirecting you back to the application. This may take a few moments."部分 - 使用 twitteR 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46309181/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com