I am using LinkedIn API for search. I wish to implement a feature where a user can search but will not need to login. Login can be done programatically using my own credentials.
I am stranded at a point where I do not know how to enter email and password in c# and then redirection will take plac开发者_StackOverflow中文版e to my callback-url once Grant Access button is clicked programatically.
Meaning I just need the oauth_verfier.
Please help!
Rajiv
I was in the same spot you're in and gave up on it. I wanted to access public search results from the LinkedIn API in C#. I shouldn't have to log in, it's public! I ended up giving up on it though.
It's a necessary part of the process to redirect the user to a linked in page, then redirect page to your page. Here's a good test application which helped me understand the authentication steps: http://developer.linkedin.com/message/2185
Also, the LinkedIn OAuth Authentication document has a good diagram of the authentication flow.
I would recommend checking out the LinkedIn Developer Toolkit (http://linkedintoolkit.codeplex.com/). They have built a nice C# library that wraps the LinkedIn REST API.
Once you provide your credentials to LinkedIn for the first time via your app, you can store the token in the provided XMLTokenManager. The token can then be reused on subsequent requests, and you won't be prompted to reenter your LinkedIn credentials. The LinkedIn Developer Toolkit uses the DotNetOpenAuth library for OpenAuth authentication.
You seem to imply that it is OK for the application to use your person LinkedIn credentials for searches, so this should work for you.
I'm using the library to retrieve my LinkedIn Recommendations and display them on my company web site.
Not sure I completely follow what you're building, but would it work can use the pub section of their website? (which isn't very discoverable).
Using a URL like this no credentials are needed: http://www.linkedin.com/pub/dir/?first=Ryan&last=Farley
You could parse the results to display differently, however doing so does violate the site user agreement.
I am pretty sure their public API does not allow for a public search (at least not the last I looked at it)
精彩评论