Preparing for Flatiron Presentation

ValOsip
iOS Blogs
Published in
3 min readJun 25, 2015

Since we only had 7 days to think of an idea and actually make it work, we decided to go home, think of ideas and regroup the following day to pick one to present.

That night, an idea basically fell into my lap, when a buddy of mine asked me a question about Instagram posts. He wanted to know if it was possible to find out which of his posts had the most likes.

Luckily, Cong (my presentation partner) liked this idea. So we talked it over between ourselves and then pitched the idea to the instructors.

We made a basic outline of what we would need to do:

  1. Connect to Instagram API
  2. Gather user data (Make API requests)
  3. Sort the data (Data is returned in a JSON format)
  4. Display the data back to the user

Since we were only in week 3 of class, we really only knew how to partially do 2 of those things.

“Make it work, make it right, make it fast”

We had a lot of work ahead of us, so we decided to attempt to make it work. The original goal was to connect to the API and get some kind of request by the second/third day or we might need to come up with a new idea for a presentation.

The instructors suggested we search through the cocoapods to see if there was anything already built for Instagram and told us about the AFnetworking pod.

Connecting to the API:

We found that there was already cocoapod for Instagram authentication (InstagramSimpleOAuth), which helped us eliminate a huge pain of having to do that manually. Once we installed the pod, and entered in our developer keys, it was as simple as NSLogging the Auth token to verify that we had a valid connection.

Gathering the data:

To gather the data, we needed to make an API call using the above Auth Token.

Getting the user feed seemed like an easy call to make: “https://api.instagram.com/v1/users/self/media/recent/?access_token=TOKEN”

We made a simple UIButton:

The response looked something like this:

After installing a JSON plugin into chrome, it was cleaned up a bit:

Sorting the data:

The JSON response is basically a set of arrays and dictionaries. We know how to sort it right? We started out with a very basic attempt to pull something out of it

Displaying the data to user:

Next we needed to display the info to the user: Since we were going over table views and custom cells, it made sense to use what we’ve learned.

“MAKE IT WORK”

Focusing on the “Make it work”, allowed us to complete all of the above steps in the first day or two. Which greatly reduced the pressure of only having 7 days before we had to present.

Since we knew that we could make it work, we spent the next few days thinking of other features, designs and better ways of getting things done.

Here’s the “finished” product that we presented on:

--

--