简体   繁体   English

PHP LinkedIn API与Jav​​ascript LinkedIN API集成

[英]PHP LinkedIn API integration with Javascript LinkedIN API

first I was using JAVASCRIPT linkedin API for getting profile information and its working very fine. 首先,我使用JAVASCRIPT linkedin API来获取配置文件信息,并且它的工作非常好。 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. 但是现在我想为我的Project使用PHP LinkedIN API,但关键是我想使用PHP API仅用于授权目的和Javascript中我想要的其余代码,例如使用IN对象获取配置文件信息和人员搜索方法调用。

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. 我可以授权使用PHP API,但我的问题是,当我尝试使用IN对象时,它告诉您首先需要授权。

So is their any mechanism by which Javascript API knows that I authorized the user already and then start to use the IN object? 他们的任何机制也是如此,Javascript API知道我已经授权用户然后开始使用IN对象了吗?

If you're signed in via linkedin and have previously authorized the application, you can start making javascript calls directly. 如果您是通过linkedin登录并且之前已经授权该应用程序,则可以直接开始进行javascript调用。 JS API uses OAuth 2.0, where tokens are exchanged transparently via the token and the server. JS API使用OAuth 2.0,其中令牌通过令牌和服务器透明地交换。 This authentication flow is much easier than the server-based authentication, which still uses OAuth 1.0a (I think). 此身份验证流程比基于服务器的身份验证要容易得多,后者仍然使用OAuth 1.0a(我认为)。

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 但是,如果您需要在通过JS进行身份验证后进行基于PHP的调用,那么本文应该可以帮助您: 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. 但是,似乎你想通过PHP进行身份验证,然后通过JS进行调用,我不明白为什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM