Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Beau Lebens

    (@beaulebens)

    Hi Ben, thanks for the report.

    Hrm, I haven’t specifically tried interacting with any company pages using this method, so I’m not sure what’s going on there/what’s missing/what’s broken.

    Are you using some custom code on top of Keyring to try to pull data from a company page or something? Can you give me a bit more info on what exactly you’re trying to do, then I’ll see if I can replicate/debug.

    To be honest I’m not even sure how to get set up with access to a company page, so if you could drop me a line on how to do that on LinkedIn as well, that’d be great.

    Thanks!

    Thread Starter benjaminniess

    (@benjaminniess)

    Hi Beau,

    Thanks for your reply and sorry for my late one.

    Actually it seems that LinkedIn uses a OAuth 2.0 to generate a token with a step with a code that you have to send back to get the final token.

    https://developer.linkedin.com/docs/oauth2

    In Keyring, I saw that the LinkedIn class extends from Keyring_Service_OAuth1 and when I call the “request” method of the LinkedIn Keyring_Service there is no added token.

    What I’d like to do is fetch a company feed as per this example at the bottom of the page: https://developer.linkedin.com/docs/rest-api# and as the example, what I receive is an 401 as if you try to reach: https://api.linkedin.com/v1/companies/1337/updates?start=20&count=10&format=json

    I don’t know if LinkedIn Auth protocol has change since you wrote the plugin or if you have a special trick to fetch the data but I guess that the LinkedIn service has to extends from Keyring_Service_OAuth2. Do you agree?

    By the way I’ve just written a Vimeo keyring service. Let me know if you want to give it a go and maybe intergrate it to the plugin.

    Thanks again!
    Best,
    Ben

    Thread Starter benjaminniess

    (@benjaminniess)

    Hi Beau,

    I have some more information for you ??

    There’s a LinkedIn API debug tool here where you can try their API endpoints.

    https://apigee.com/console/linkedin

    If you try any of them (for me it’s “Get a company profile (simple)”), you’ll need to sign-in with your Linkedin account and you’ll see that a token is added to the query.

    In the Keyring class, even if we create credentials that seem to work, API calls are made without token so we receive an error. I guess that it’s the point.

    Let me know if you get a chance to give it a go.

    Thanks.
    Best,

    Ben

    Plugin Author Beau Lebens

    (@beaulebens)

    The current implementation does send auth tokens, but it sends them via a header, so you don’t see them in the URLs being requested.

    From what I can tell, LinkedIn has upgraded now and is using OAuth2, not the OAuth1 from when this was first written. Some requests work still, but not this one. I guess that means I’ll need to write an OAuth2 version to be able to do things like this.

    I’ve created an issue for it here; https://github.com/beaulebens/keyring/issues/20

    Thread Starter benjaminniess

    (@benjaminniess)

    That would be awesome, thanks for the issue!

    Best,

    Ben

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Linkedin connection error’ is closed to new replies.