1

我有一个要求,我必须显示来自用户帐户的 Instagram 照片xxxx和标记为x,x2,x3,x4.

是否可以使用 instafeed.js 脚本同时处理基于用户帐户和基于标记的照片

密码笔

脚本

var instaFeed = new Instafeed({
                    get: 'user',
                    userId: 6678174,
                    accessToken: '6678174.467ede5.205a03ebc4b74d4082823781c3149575',
                    target: 'instafeed',
                    sortBy: 'most-recent',
                    limit: 32,
                    resolution: 'standard_resolution',
  template: '<a class="fancybox" href="{{image}}"><img src="{{image}}" /><div id="filter">{{model.filter}}</div><div class="info"><p class="location"><i class="icon-location"></i>{{location}}</p><p><i class="icon-comment"></i>{{caption}}</p><br><ul><li class="icon-heart">{{likes}} likes<li class="icon-chat">{{comments}} comments</ul></div></a>'
}).run();

$.fn.extend({
  matchHeight: function(data){
    var maxHeight = 0;
    $(this).each(function() {
       maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height();
    });
   $(this).height(maxHeight);
  }
});
4

1 回答 1

1

没有一个 API 可以让您同时进行用户和主题标签搜索。

您可以使用用户/媒体 API 获取照片并tags在 API 响应中手动检查每张照片的主题标签

https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN

http://gramfeed.com已经实现了这一点,在 gramfeed 上搜索并打开一个用户页面,滚动并加载所有照片,然后使用filter by keyword过滤带有标签的照片

于 2015-05-14T14:23:36.707 回答