2015-12-01 66 views
3

我不能使用Instagram的API的所有圖像,分頁似乎是工作有些不同,我無法理解這一點尚未Instagram的API和分頁

我使用要求: 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": "https:\/\/scontent.cdninstagram.com\/hphotos-xap1\/t51.2885-15\/e15\/11934647_531283580370186_1131008999_n.jpg", 
     "width": 612, 
     "height": 612 
    } 
    }, 
    "users_in_photo": [ 

    ], 
    "caption": { 
    "created_time": "1442825564", 
    "text": "#\u0413\u0440\u0430\u043d\u0430\u0434\u0430 #\u0418\u0441\u043f\u0430\u043d\u0438\u044f #photooftheday #picoftheday #instalike #followme #vscogood #vscocam #vsco #instafollow #travel #traveling #instatravel #instalife #tourism #gf #beauty #beautiful #amazing #travelphoto", 
    "from": { 
     "username": "solotravel_me", 
     "profile_picture": "https:\/\/igcdn-photos-h-a.akamaihd.net\/hphotos-ak-xaf1\/t51.2885-19\/11282631_115839268762391_863189534_a.jpg", 
     "id": "736938591", 
     "full_name": "and" 
    }, 
    "id": "1078821495951073761" 
    }, 
    "user_has_liked": false, 
    "id": "1078821489441513767_736938591", 
    "user": { 
    "username": "solotravel_me", 
    "profile_picture": "https:\/\/igcdn-photos-h-a.akamaihd.net\/hphotos-ak-xaf1\/t51.2885-19\/11282631_115839268762391_863189534_a.jpg", 
    "id": "736938591", 
    "full_name": "and" 
    } 
} 
... 

後,我試圖用max_id參數,但我不知道我需要使用 我試了照片的ID其中ID,photo_user ID,我甚至試過時間戳(發現Ť每一次他的一些想法論壇),但我只接收第一20張

例如: https://api.instagram.com/v1/users/self/media/recent?access_token=TOKEN&max_id=1078821495951073761

+0

只使用pagination.next_url完美地工作了近5年 – krisrak

+0

忘了告訴,分頁對象爲空 '{ 「分頁」:{ }, 「元」:{ 「代碼」:200 }, 「數據」:[ ... ] }' – lasoweq

+0

但也有更多的,不僅僅是20張 – lasoweq

回答

13

我是有空分頁對象相同的問題,而實際上考慮了更多的照片。

只是爲了讓事情變得清晰。這個問題在原始問題的評論中得到了回答。

分頁對象中沒有任何內容,因爲應用程序處於沙盒模式,沙盒模式下的應用程序永遠不會返回超過20個帖子(照片)。