An example for the PR team for pulling in user-generated content from social media. Using the IFTTT service, they're able 'like' photos on other social channels, which will pull them into a catch-all Tumblr account that feeds into the primary website.
Tools Utilized: Tumblr API, jQuery, Ajax, JSON
View this project on GitHub
Knowing the posts would only ever be images, I kept things simple with just an ajax call for the posts:
$.ajax({
url: "http://api.tumblr.com/v2/blog/[tumblr name]/posts?api_key=[api key]",
dataType: 'jsonp',
success: function(info){
...
}
});
The rest is just appending each post to a pre-styled grid, then, for effect, fading the images one-by-one into view:
var postings = posts.response.posts;
var text = '';
for (var i in postings) {
var p = postings[i];
var image = p.photos[0].alt_sizes[2];
text += '[image wrapped in the URL to the individual post]';
}
$('#tumblr ul').append(text);
...
thumbnail.each(function(i) {
$(this).delay((i++) * 100).fadeTo(200, 1);
});
Results: