0

Instagram 最近是否改变了您可以通过自己的图像提要提取的方式?

我已经使用下面的代码几个月了,直到最近它完全停止工作时它才能正常工作。

这是我正在使用的代码

$(function() {
var cmdURL, embedImage, onPhotoLoaded, param, tag_name, userid,
param = {
access_token: '3794301.f59def8.e08bcd8b10614074882b2d1b787e2b6f', // feel free to change it with your own access token
count: 10 // the total number of images
},
tag = 'Gezzamondoportfolio', // your user id. you can find this one out by looking into one of your pictures uri
tag_name = '#photowall',
cmdURL = 'https://api.instagram.com/v1/tags/' + tag + '/media/recent?callback=?';

 embedImage = function(photo) {
var a, img;
img = $('<img/>').attr({
  //'src': photo.images.thumbnail.url,
  //'width': photo.images.thumbnail.width,
  //'height': photo.images.thumbnail.height
  'src': photo.images.standard_resolution.url,
  'width': photo.images.standard_resolution.width,
  'height': photo.images.standard_resolution.height
});
a = $('<a />').attr({
  'href': photo.images.standard_resolution.url,
  'target': '_blank',
  'class': 'pull-left'
}).append(img).appendTo(tag_name);
};

onPhotoLoaded = function(data) {
var photo, _i, _len, _ref, _results;
if (data.meta.code === 200 && data.data) {
  _ref = data.data;
  _results = [];
  for (_i = 0, _len = _ref.length; _i < _len; _i++) {
    photo = _ref[_i];
    _results.push(embedImage(photo));
  }
  return _results;
}
};
return $.getJSON(cmdURL, param, onPhotoLoaded);
});
4

1 回答 1

0

这通常是以下两种情况之一:

  1. Instagram API 离线或遇到性能问题。您可以在此处查看其状态:http ://api-status.com/6404/174981/Instagram-API 。昨天好像遇到了一些问题。
  2. 您已超出速率限制。
于 2013-05-06T17:23:46.730 回答