Created
June 7, 2014 00:52
-
-
Save halfempty/d5dd9b636b69ffa2e5c5 to your computer and use it in GitHub Desktop.
Instafeed example for @jerb0x
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
var feed = new Instafeed({ | |
get: 'user', | |
userId: 636337139, | |
accessToken: '262351.467ede5.176ab1984b1d47e6b8dea518109d7a5e', | |
link: 'true', | |
clientId: '80aeda87e8c44281b83ce6f542a30933', | |
limit: '1', | |
sortBy: 'most-recent', | |
resolution: 'standard_resolution', | |
links: false, | |
template: '<h3>{{model.created_time}} {{model.tagsFormatted}}</h3><img src="{{image}}" />', | |
filter: function(image) { | |
var date = new Date(image.created_time*1000); | |
m = date.getMonth(); | |
d = date.getDate(); | |
y = date.getFullYear(); | |
var month_names = new Array ( ); | |
month_names[month_names.length] = "Jan"; | |
month_names[month_names.length] = "Feb"; | |
month_names[month_names.length] = "Mar"; | |
month_names[month_names.length] = "Apr"; | |
month_names[month_names.length] = "May"; | |
month_names[month_names.length] = "Jun"; | |
month_names[month_names.length] = "Jul"; | |
month_names[month_names.length] = "Aug"; | |
month_names[month_names.length] = "Sep"; | |
month_names[month_names.length] = "Oct"; | |
month_names[month_names.length] = "Nov"; | |
month_names[month_names.length] = "Dec"; | |
var thetime = month_names[m] + ' ' + d + ' ' + y; | |
image.created_time = thetime; | |
return true; | |
} | |
}); | |
feed.run(); |
Thanks!
Thank you!
awesome thank you
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks... Great help!!