1

我希望我的网站能够显示在 Instagram 上发布的所有#awesome,而我只得到我发布的那些。谁能帮我解决这个问题?任何帮助深表感谢!

旁注:我真的不想要#awesome,我正在用更通用的东西来保护我想要的东西!

<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>
4

0 回答 0