ashwinks / PHP-LinkedIn-SDK

A PHP wrapper for the LinkedIn API
94 stars 74 forks source link

Added Authorization: Bearer header to the request #24

Closed JaffParker closed 8 years ago

JaffParker commented 8 years ago

I have faced a problem where LinkedIn would return Unknown authentication scheme because the token was only included in the HTTP parameters. However, the official documentation states that to successfully sign requests, we have to include an Authorization header:

Once you've obtained an Access Token, you can start making authenticated API requests on behalf of the user. This is accomplished by including an "Authorization" header in your HTTP call to LinkedIn's API.

So I edited the class to include the header in the fetch method.

JaffParker commented 8 years ago

Also, I am not sure that the oauth2_access_token parameter that you include with the URL is actually necessary.

ashwinks commented 8 years ago

Thanks Jaff!