Instafeed.js不会提取所有用户#,只提取我发布的

时间:2016-05-12 14:26:45

标签: javascript hashtag instafeedjs

我希望我的网站能够显示在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>

0 个答案:

没有答案