Announcement Announcement Module
Collapse
No announcement yet.
Social support for LinkedIn Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Social support for LinkedIn

    Hi,

    I have been trying to connect to LinkedIn with the build snapshot version with spring core 1.0.2.

    However, when the execution kicks in, it fails at the setUseParametersForClientAuthentication complaining of a No method exception. I checked the latest OAuth2Template class on github too and it does not seem to have this method. Either I am not using the correct dependencies required for LinkedIn or its not yet supported. please suggest.

    thanks!

    OAuth2Template oAuth2Template = new OAuth2Template(clientId, clientSecret,
    "https://www.linkedin.com/uas/oauth2/authorization",
    "https://www.linkedin.com/uas/oauth2/accessToken");
    oAuth2Template.setUseParametersForClientAuthentica tion(true);

  • #2
    I figured out that the new OAuth2Template class with the method is available only in the latest spring core 1.1.0 build snapshot.

    This is resolved.

    Comment


    • #3
      The new LinkedInTemplate however takes in just the API key. The previous one takes in all the 4 tokens and would build the template to be used to invoke the linked in REST calls. The new one having consumed just the API key subsequently throws a 401 not authorized when invoking the linked in API calls. I am looking into this and get back. In the meantime, if anyone has already encountered this scenario then do suggest.

      thanks!

      Comment


      • #4
        I'm a bit unclear as to what it is that you're struggling with.

        The new LinkedInTemplate, being based on OAuth 2, *only* needs an access token to do its job. The old one, being based on OAuth 1) needed the client credentials, the access token, and the access token secret. Since Spring Social LinkedIn hadn't yet been released as 1.0.0.RELEASE, I felt free to make this adjustment. If anyone is already using it the old way, they can still do so by using the RC1 release...but I encourage them to be ready to move forward asap.

        As for the 401 errors you are getting. I do not know why this happens for sure, but I have a theory. I've tested the new stuff quite some bit and as long as the token I give it has proper scope, it has worked with no problems. I'm not saying that I've left no stone unturned, but I've not encountered any problems yet.

        As for my theory on why you're getting 401: Are you using the *same* access token you were using when it was OAuth 1-based? If so, that's probably the issue. You'll need to go through the OAuth 2 connection flow to get a new access token and use it. The OAuth 1 tokens will no longer work.

        Comment


        • #5
          Yes I figured I need to procure an access token from LinkedIn. Unfortunately LinkedIn support & API is not as friendly as fb/tw's. I will see when i can procure one and then try it out and get back to the group.

          thanks!

          Comment

          Working...
          X