postaddictme / instagram-java-scraper

Instagram Java Scraper. Get account information, photos, videos and comments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getMedias(long userId, int pageCount, PageInfo pageCursor) returns 302 response

nbraun1 opened this issue · comments

Hi,

If I want to get the next page of medias for an specified user, I'll run into an 302 response. I'm not really sure, where I can find the maxId to request the next page, so I took the id of the first media object and passed it to the request. Here is an small code sample:

instagram.getMedias(account.getId(), 1, new PageInfo(true, String.valueOf(medias.getNodes().get(0).getId())));

Note, that I sent this request without an login! The problem is, if I tried to send a login request, I got a 400 response. However, my credentials are correct! Apart from that, I saw that there is an similar issue (see #145).

Now, my question to you, is the 302 response for a paginated media request caused in my code or in your API?

Thank you in advance for your help.
Best regards.