Random Instagram Back

26-07-2014

A few weeks back I logged onto The Bauble to post up an entry and noticed that the site was taking a lot longer to load than normal. After it finally did appear I spotted the Instagram bubble, usually displaying a random image from my Instagram account, had up and died on me. The bubble was there, just no image.

This sorta thing gets at the pedantic coder in me. The feature had been working before for months and now suddenly wasn't. Worse I was in work and had no chance during the day of discovery to try and fix things.

What is a Jester to do?

I quickly logged onto the site and disabled the feature until I could get some time to work on it.

What had happened was the third party site that I used to pull down my Instagram feed from had decided to rebrand themselves. Rebrand and at the same time inform nobody they had done it nor make sure that the new stuff was backwards compatible with the old services they provided.

This of course presented me with a problem. I needed to recode the feature so that I could get my random image bubble working again. But should I go down the road of coding to the new service or using the actually api calls that Instagram provides?

See, back when I first wrote the code for that bubble Instagram kept all their calls private from the public. Now, it seems, they have opened up everything. So one quick developer account creation, a little json parsing, and some multi-dimensional array headaches later I was once again pulling down my Instagram feed and getting a random image to load.

This time from the source itself.

Not a bad way to waste some time on a weekend where the aim was to do very little ;)

Blue_jester




Leave a comment...

Name (required)