Using the LinkedIn API in a C# application

人走茶凉 提交于 2019-12-01 19:22:29

You might check out the examples linked to from the Libraries and Tools page on the LinkedIn Developer Portal. The "Working C# example" posted by one of our community members works well...

https://developer.linkedin.com/sites/default/files/LinkedInAuth.rar.zip

We have a few other C# examples as well, but this should get you started - it has an example of getting an access token and making a request.

Maybe you should check the LinkedInNET lib on github. The API coverage is not full but it's growing.

There is a NuGet package

PM> Install-Package Sparkle.LinkedInNET

You will have the challenge of authenticating your user within your winforms app though.

You need to get used to the OAuth authorization mechanism. It essentially makes the user go to the linkedin website, signin and allow your application to access their data from linked in.

It is briefly described in the documentation for the LinkedIn Developer Toolkit. Look into the WebOAuthAuthorization class. It's really small and has two important methods:

  • BeginAuthorize(Uri callback)
  • CompleteAuthorize()

The Former method sends the user to linkedin website for authorization. The callback parameter is used by linked in to notify your website about the result of the authorization. At that point you must call the CompleteAuthorization() method for your application to finish establishing a session with linked in for this particular user.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!