While I was researching my LinkedIn data scientists article I had coffee with Adam Trachtenberg. I haven't used the LinkedIn API since when I last looked into it there was no way to find users just by their names and locations. I was happy to discover that the People Search API now makes this straightforward, so in the last few days I've been researching how I can integrate this into my work.
The biggest obstacle was getting past the OAuth login stage, since implementing a secure protocol over plain http means a convoluted dance, and no two vendors do it quite the same. There's a few other examples out there, but I adapted my Gmail/IMAP OAuth PHP code to work with their setup. For your delectation and delight, I present LinkedInOAuthExample, now live on github. It's written to be as concise and dependency-free as possible, but I still find the steps involved somewhat mind-bending. OAuth 2.0 is a lot cleaner, at the cost of requiring an https server, I hope that will become the default for future APIs.

Comments