Ithagram was a random idea I had one day, when thinking “what would Twithaca look like on Instagram?”
Since Instagram does not allow people to syndicate posts, the alternative was to create a website that just assembles a snapshot of “what are people seeing in Ithaca lately?”
Initially, the app used the InstaFeed.js library, and functioned almost the same as it is today, except it was entirely client-side and could load additional pages of photos (browsing further back than just the most recent 36).
In June 2016, though, Facebook changed the Instagram API and required all developers to re-authorize. Usage such as ithagram.org was not justifiable use of their API and I’d be limited to sandbox mode: only the 20 most recent photos from my own feed. Unacceptable.
Undaunted, I re-wrote the whole thing. I used raiym’s Instagram PHP Parser (which depended on Unirest’s HTTP Parser) — initially I tried to just cURL the data, but Instagram’s website uses a React framework that loads all the images asynchronously. The Instagram PHP Parser successfully loaded the images, and I wrote in some caching to help it load faster. It did not, however load the User data like the old version did.
To do that, I had to write a separate script that ran after the images loaded (so that it didn’t block the images from loading) — it accepted an array of user IDs, checked those against a cache of user data, and requested the remainder from the Instagram PHP Parser.
The site is now responsive (built on the Bootstrap framework) as well.