0

我已经推荐了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?

4

1 回答 1

0

经过几天的努力,终于知道了这个问题。问题是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。

于 2014-06-11T14:49:31.623 回答