Created
November 15, 2013 10:33
-
-
Save inlanger/7482344 to your computer and use it in GitHub Desktop.
Get 9 latest photos from foursquare api for venue Need to register an app here - https://foursquare.com/oauth
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
$("#foursquare_photos").html('<h2>Loading photos...</h2>'); | |
$.get("https://api.foursquare.com/v2/venues/VENUE_ID/photos?limit=9&client_id=ID&client_secret=SECRET&v=20131016", function (data) { | |
$("#foursquare_photos").html(''); | |
$(data.response.photos.items).each(function (i, val) { | |
$("#foursquare_photos").append('<div class="fsphoto"><img src="' + val.prefix + '70x70' +val.suffix + '"></div>'); | |
}); | |
}, 'json'); |
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
#foursquare_photos { | |
width: 280px; | |
} | |
.fsphoto { | |
float: left; | |
magrin: 5px; | |
display: inline-block; | |
width: 80px; | |
height: 80px; | |
border: 3px solid #ffffff; | |
background-position: center center; | |
background-size: cover; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment