我无法使用Instagram API获取所有图像,Pagination似乎在某种程度上有所不同,我还无法理解它
我使用请求: https://api.instagram.com/v1/users/self/media/recent?access_token = TOKEN
并且可以获得前20张照片:
...
{
"attribution": null,
"tags": [
"beautiful",
"instalife",
"picoftheday",
"beauty",
"instalike",
"gf",
"traveling",
"instatravel",
"vsco",
"tourism",
"\u0438\u0441\u043f\u0430\u043d\u0438\u044f",
"travelphoto",
"vscogood",
"instafollow",
"travel",
"\u0433\u0440\u0430\u043d\u0430\u0434\u0430",
"amazing",
"vscocam",
"followme",
"photooftheday"
],
"type": "image",
"location": null,
"comments": {
"count": 1
},
"filter": "Normal",
"created_time": "1442825564",
"link": "https:\/\/instagram.com\/p\/74vm3GOCEn\/",
"likes": {
"count": 18
},
"images": {
"low_resolution": {
"url": "https:\/\/scontent.cdninstagram.com\/hphotos-xap1\/t51.2885-15\/s320x320\/e15\/11934647_531283580370186_1131008999_n.jpg",
"width": 320,
"height": 320
},
"thumbnail": {
"url": "https:\/\/scontent.cdninstagram.com\/hphotos-xap1\/t51.2885-15\/s150x150\/e15\/11934647_531283580370186_1131008999_n.jpg",
"width": 150,
"height": 150
},
"standard_resolution": {
"url": …Run Code Online (Sandbox Code Playgroud) 我在我的项目中使用https://github.com/simpulton/angularjs-wizard,它有效,(我稍微修改了一下,替换var app为$scope)
但我需要将一个变量传递给open函数:
$scope.open = function (image)
{
$scope.image = image;
var modalInstance = $uibModal.open({
templateUrl: 'wizard.html',
controllerAs: 'modal',
size: 'lg',
controller: 'ModalCtrl',
resolve: {
image: function () {
return image;
}
}
});
modalInstance.result
.then(function (data) {
$scope.closeAlert();
$scope.summary = data;
}, function (reason) {
$scope.reason = reason;
});
};
Run Code Online (Sandbox Code Playgroud)
并在 html 中:
ng-click="open(image)"
Run Code Online (Sandbox Code Playgroud)
但image就是undefined在我的模板
如果我只是模态窗口,它就可以工作,示例来自https://angular-ui.github.io/bootstrap/#/modal,但不适用于此向导示例
更新:
https://jsfiddle.net/Ginstay/znz64sk3/2/
是的,当我打开模态窗口时,ajax 已完成
如果我向return image;图像添加断点就在那里