Search code examples
spring-socialbroadleaf-commerce

spring-social-twitter error 401 unauthorized


I have referred http://www.broadleafcommerce.com/blog/why-your-ecommerce-site-should-integrate-with-spring-social to bring fb and twitter login to my broadleaf site but i am facing following error despite trying many of the solutions posted on stackoverflow and twitter dev support

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

Anybody have any idea how to deal with this error? Is it because in the tutorial 1.0.2.RELEASE version of spring social is used?


Solution

  • After days of effort finally got to know the issue. The problem was version of spring social api. Since the post i was referring to was of sept,2012 as a result i was using 1.0.2-Release which used auth1.0 to connect to twitter but in 2013 twitter started using auth1.1 whose support is in spring social 1.0.3-Release api. Hence i simply changed the version of spring social and the problem got resolved.

    Also one thing i found out the twitter does not allow user's email id to be seen so the api calls to get email of a user will always return null.