Why Publish an API and then change it with no warning?
First published: 17th January 2018
This is a rant against LinkedIn. I've made a technical post about this on StackOverflow, but this is where I vent my frustration.
Why, oh why are you messing me about, LinkedIn? Have I done something to offend you? Do you hate me?
If you are reading this on LinkedIn, then I've done something to fix or work around the problem, but still, LinkedIn, you could have warned me first.
So what's going on? Like other social networks, LinkedIn provides an API (Application Programmer Interface) which developers can use to access the social network, getting and posting information. It's how third parties add interesting features and games to your favourite social network. My objective is to make my life easier: when I publish a new story (like this one) on my website, I want it to be posted automatically to my social media accounts. I made an app that did that for LinkedIn and Twitter (I've still got work to do for Facebook, but that's another story), and it worked. Yippee!
Today, my app stopped working on LinkedIn. Actually, it did worse than that, it started repeat-posting. Before my app posts stories, it asked LinkedIn for the timestamp of the current story posted on my account, and then uses that to decide which new stories to post. Today, instead of reporting the timestamp, LinkedIn gives an error. My app didn't handle the error well, and posted some recent stories. I've improved the app to not post anything if it gets an error instead of the timestamp. I don't get more repeated posts, but I've also stopped posting to LinkedIn.
Why Publish a Specification if you don't Update it?
An API is a specification: 'your app can use our social network site if you follow these instructions and rules'. LinkedIn has published documentation for their API, the part I was using is described in Basic Profile Fields, under current-share. At the time of writing, the field is still described on that page, but it does not work when actually used.
LinkedIn, if you change the functionality, you should update the documentation. Preferably in advance, with a date for the change.
Hold on, LinkedIn has a Developer Blog, where I can, to quote, "Stay up-to-date on information of interest to the LinkedIn development community." Let's see, the most recent article on the blog is dated 12 September 2015, 08:00, and it's about 'LinkedIn iOS SDK: iOS 9 compatibility'. Well, isn't that useful!
LinkedIn, I would cordially like to invite you to go stick your head in a pig.
Updated: 24th January 2018
The API started working again some time before 16:25 Hong Kong time (GMT+8) today. Hopefully, it will keep working.