【问题标题】:Parse.com Authentication error: Unable to respond to any of these challenges: {oauth=www-authenticate: OAuth realm="https://api.twitter.com"}Parse.com 身份验证错误:无法响应任何这些挑战:{oauth=www-authenticate: OAuth realm="https://api.twitter.com"}
【发布时间】:2014-04-29 06:11:25
【问题描述】:

将 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 上问过一个问题,但也许你们知道问题出在哪里。 提前致谢。

【问题讨论】:

    标签: android authentication twitter parse-platform


    【解决方案1】:

    通过在 Twitter 应用程序设置中为回调 URL 指定 http://www.localhost.com/callback 并为网站指定 http://www.localhost.com 解决了此问题。

    【讨论】:

      【解决方案2】:

      正如其他成员所建议的,您需要在 Twitter 应用程序中指定回调 URL 和网站,还要注意如何初始化 ParseTwitterUtils。

      仅出于测试目的,请尝试直接使用消费者密钥和秘密,看看它是否有效,例如:

      ...
      ParseTwitterUtils.initialize("TWITTER_CONSUMER_KEY", "TWITTER_CONSUMER_SECRET");
      ParseTwitterUtils.logIn(this, new LogInCallback() {
      ... 
      

      *** 注意:这不是最佳实践!!!

      【讨论】:

        猜你喜欢
        • 2015-06-03
        • 2015-08-23
        • 1970-01-01
        • 2015-09-14
        • 1970-01-01
        • 2014-12-14
        • 2012-08-06
        • 2014-06-07
        • 1970-01-01
        相关资源
        最近更新 更多