Joh*_*Doe 5 authentication twitter r
我遇到了与此问题中描述的完全相同的问题,其中我遇到了类似的错误。但我按照说明进行操作,更改了回调网址,然后出现了新问题。我通过浏览器进入授权部分,但我一直卡在加载页面上,并出现警告“正在将您重定向回应用程序。这可能需要一些时间。” 浏览器没有被重定向,而是停止并警告它无法访问该页面 - 而且,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
Run Code Online (Sandbox Code Playgroud)
我遇到了这个问题,但在 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
}));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1934 次 |
| 最近记录: |