Created
June 23, 2015 05:56
-
-
Save lukeandersen/c58c8781615396661b2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.ajax({ | |
| type: "GET", | |
| dataType: "jsonp", | |
| cache: false, | |
| url: "https://api.instagram.com/v1/users/140572/media/recent/?access_token=6277169.76495e2.ac7aa5ca54094298b10f8b6a527a9ec3", // Get user images | |
| // Get user iD - http://instagram-uid.herokuapp.com/ | |
| // "https://api.instagram.com/v1/tags/catwalk/media/recent?client_id=6277169&access_token=6277169.76495e2.ac7aa5ca54094298b10f8b6a527a9ec3", // Get Tagged images | |
| success: function(data) { | |
| for (var i = 0; i < 9; i++) { | |
| $("#instagram").append("<li><a target='_blank' rel='lightbox' href='" + data.data[i].images.standard_resolution.url + "'><img src='" + data.data[i].images.low_resolution.url +"'></img></a></li>"); | |
| } | |
| $('a[rel=lightbox]').fancybox({ | |
| overlayColor: '#000', | |
| overlayOpacity: 0.55, padding: 0, | |
| titlePosition: 'inside' | |
| }); | |
| }, | |
| error: function (xhr) { | |
| $("#instagram").append("<p>Sorry, could not load images right now :(</p>"); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment