Instagram API


In order to obtain an API from instagram, we had to go through to the developers page of the website.

Screen Shot 2016-03-23 at 11.47.35 a.m..png

We registered our application, and signed up for an API in a similar way to the Flickr one.

From this we retrieved our client ID and secret. Our client ID was to be used as our access token to allow us to search across images on instagram.

Using this code for instagram, which originally put images into a grid like so, we modified the code in order to do what we wanted.

Screen Shot 2016-03-23 at 11.59.19 a.m..png

the array for the images is stored above the setup in order to declare that the JSONArray of images is called all.

Within the set up, a function called loadEmUp is used, which is what runs in the setup and retrieves the images before drawing them.

The function is explained outside of the draw loop, and is made a function by using void at the start. The code at the moment loads images with the tag of art. It retrieves the images and places them into a grid with the use of the integers (int) row and column. It does this in the ‘if’ part, when the images fill up a column of 5 it then resets the column back to zero and adds images onto a new row therefore creating a grid of images.

Screen Shot 2016-03-23 at 11.59.49 a.m..png

Screen Shot 2016-03-23 at 11.56.35 a.m..png

The images are not moving or changing which is what we want them to do. This is the basic code we used and modified.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s