Android Parse.com身份验证错误:无法响应以下任何挑战:{oauth=www authenticate:oauth realm=";https://api.twitter.com"}
将Parse Android SDK升级到1.4.1版后,Twitter登录停止工作。当我尝试使用Twitter登录时:Android Parse.com身份验证错误:无法响应以下任何挑战:{oauth=www authenticate:oauth realm=";https://api.twitter.com"},android,authentication,twitter,parse-platform,Android,Authentication,Twitter,Parse Platform,将Parse Android SDK升级到1.4.1版后,Twitter登录停止工作。当我尝试使用Twitter登录时: ParseTwitterUtils.initialize(Constants.TWITTER_CONSUMER_KEY, Constants.TWITTER_CONSUMER_SECRET); ParseTwitterUtils.logIn(activity, new LogInCallback() { @Override public void done(P
ParseTwitterUtils.initialize(Constants.TWITTER_CONSUMER_KEY, Constants.TWITTER_CONSUMER_SECRET);
ParseTwitterUtils.logIn(activity, new LogInCallback() {
@Override
public void done(ParseUser parseUser, ParseException e) {
if (e == null) {
// Success
} else {
// Error
}
}
});
我得到了一个错误:
Authentication error: Unable to respond to any of these challenges: {oauth=www-authenticate: OAuth realm="https://api.twitter.com"}
我已经问了一个问题,但也许你们知道问题出在哪里。
提前感谢。通过指定
http://www.localhost.com/callback
用于回调URL和http://www.localhost.com
用于Twitter应用程序设置中的网站。正如其他成员所建议的,您需要在Twitter应用程序中指定回调URL和网站,还要注意如何初始化ParseTwitterUtils
出于测试目的,请尝试直接使用使用者密钥和密码,看看是否有效,例如:
...
ParseTwitterUtils.initialize("TWITTER_CONSUMER_KEY", "TWITTER_CONSUMER_SECRET");
ParseTwitterUtils.logIn(this, new LogInCallback() {
...
***注意:这不是最佳实践