将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(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"}
我已经问过一个关于Parse.com的问题,但也许你们知道问题出在哪里。
提前谢谢。
最佳答案
通过在twitter应用程序设置中为回调url和网站指定http://www.localhost.com/callback
来解决此问题。