I would like my website to display all #awesome posted on Instagram and I am only getting the ones that I post. Can anyone help me fix this? Any help is much appreciated!
Side note: I don't really want #awesome I am protecting what I do want with something more generic!
<script type="text/javascript">
var count = 0;
var templateRowStart = '<div class="row">';
var templateRowEnd = '</div>';
var myTemplate = '<img class="insta" src=\"https:{{image}}\" />';
var myTemplateFirst = '<img class="insta first" src=\"https:{{image}}\" />';
var myTemplateLast = '<img class="insta last" src=\"https:{{image}}\" />';
var myTemplateTop = '<img class="insta top" src=\"https:{{image}}\" />';
var myTemplateBottomL = '<img class="insta bottomL" src=\"https:{{image}}\" />';
var myTemplateBottomR = '<img class="insta bottomR" src=\"https:{{image}}\" />';
var templateToUse = '';
var feed = new Instafeed({
get: 'tagged',
tagName: 'awesome',
clientId: '####',
accessToken: 'XXXX',
limit: '9',
resolution: 'standard_resolution',
each: function(){
count++;
if (/[4]/.test(count)){
templateToUse = templateRowStart + myTemplate;
} else if (/[6]/.test(count)) {
templateToUse = myTemplate + templateRowEnd;
} else if (/[1]/.test(count)) {
templateToUse = templateRowStart + myTemplateFirst;
} else if (/[9]/.test(count)) {
templateToUse = myTemplateLast + templateRowEnd;
} else if (/[2,8]/.test(count)) {
templateToUse = myTemplateTop;
} else if (/[3]/.test(count)) {
templateToUse = myTemplateBottomL + templateRowEnd;;
} else if (/[7]/.test(count)) {
templateToUse = templateRowStart + myTemplateBottomR;
} else {
templateToUse = myTemplate;
}
this.options.template = templateToUse;
},
after: function() {
// disable button if no more results to load
if (!this.hasNext()) {
loadButton.setAttribute('disabled', 'disabled');
}
},
template: templateRowStart + myTemplate
});
feed.run();
</script>