Reputation: 1541
first I was using JAVASCRIPT linkedin API for getting profile information and its working very fine. But now I want to use PHP LinkedIN API for my Project, but the point is I want to use PHP API just for authorization purpose and rest of code I want in Javascript such as getting profile information and people search method calls using IN object.
I am able to authorize using PHP API but my problem is when I try to use IN object it tells that first you need to authorize.
So is their any mechanism by which Javascript API knows that I authorized the user already and then start to use the IN object?
Upvotes: 0
Views: 1180
Reputation: 2109
If you're signed in via linkedin and have previously authorized the application, you can start making javascript calls directly. JS API uses OAuth 2.0, where tokens are exchanged transparently via the token and the server. This authentication flow is much easier than the server-based authentication, which still uses OAuth 1.0a (I think).
But if you need to make PHP-based calls after authenticating via JS, this article should help you: https://developer.linkedin.com/documents/exchange-jsapi-tokens-rest-api-oauth-tokens
However, it seems that you want to authenticate via PHP, and then make calls via JS, which I don't understand why.
Upvotes: 2