Instagram图片Feed突然停止了

时间:2013-05-05 14:30:59

标签: javascript jquery instagram

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);
});

1 个答案:

答案 0 :(得分:0)

这通常是两件事之一:

  1. Instagram API处于脱机状态或遇到性能问题。您可以在此处查看其状态:http://api-status.com/6404/174981/Instagram-API。看起来它昨天遇到了一些问题。
  2. 您已超出限额。