开发者

Help with retrieving your profile via LinkedIn's API?

开发者 https://www.devze.com 2023-02-12 00:49 出处:网络
I want to display some key fields from my linkedin profile on my personal website. From what开发者_JS百科 I understand of linkedin\'s API, I would need to do the following:

I want to display some key fields from my linkedin profile on my personal website. From what开发者_JS百科 I understand of linkedin's API, I would need to do the following:

  1. Setup a developer account & get the api key and secret
  2. Using the key and secret, go through the OAuth authentication and obtain an access token for my own account
  3. Once I have an access token, I can query the profile api for the relevant fields

What would be an easy way of getting the access token? I understand once I get the access token, I can use it for as long as I want unless I expire it via my linkedin user account. Is my understanding correct?

I'm using php5 and I dont think my webhost has PECL OAuth module compiled in.


If you have linkedin account then login into the developer site http://developer.linkedin.com/index.jspa

Create a new application from https://www.linkedin.com/secure/developer to generate the API key.

Get started documentation: http://developer.linkedin.com/docs/DOC-1008

JavaScript API http://developer.linkedin.com/docs/DOC-1206


satrun77 has the basic workflow correct in terms of creating a new application and getting your application keys. As you mentioned, you then need to authenticate your application; once you have done that LinkedIn will send back your access token, which you can then store and use on any subsequent calls. In your case, you would be just doing this for yourself, but the basic premise would work for any user.

If you want to connect to the API via PHP without the PECL OAuth extension, there is an open-source library specifically for that, along with a demo script showing basic functionality that you can use to get started:

http://code.google.com/p/simple-linkedinphp/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号