【问题标题】:spring-social-twitter error 401 unauthorizedspring-social-twitter 错误 401 未经授权
【发布时间】:2014-06-11 03:07:05
【问题描述】:

我已推荐 http://www.broadleafcommerce.com/blog/why-your-ecommerce-site-should-integrate-with-spring-social 将 fb 和 twitter 登录带到我的阔叶网站,但尽管尝试了许多在 stackoverflow 和 twitter 开发支持上发布的解决方案,但我仍面临以下错误

GET request for "https://api.twitter.com/1/account/verify_credentials.json" resulted in 401 (Unauthorized); invoking error handler

有人知道如何处理这个错误吗?是不是因为教程中使用的是1.0.2.RELEASE版本的spring social?

【问题讨论】:

    标签: spring-social broadleaf-commerce


    【解决方案1】:

    经过几天的努力终于知道了这个问题。问题是spring social api的版本。由于我指的是 2012 年 9 月的帖子,因此我使用的是 1.0.2-Release,它使用 auth1.0 连接到 twitter,但在 2013 年,twitter 开始使用 auth1.1,其支持在 spring social 1.0.3 - 发布 api。因此,我只是简单地更改了 spring social 的版本,问题得到了解决。

    还有一件事我发现 twitter 不允许看到用户的电子邮件 ID,因此获取用户电子邮件的 api 调用将始终返回 null。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-10
      • 2012-06-24
      • 2012-04-08
      • 1970-01-01
      • 2014-01-02
      • 2014-04-03
      • 2022-01-21
      • 2015-04-19
      相关资源
      最近更新 更多