Coder Social home page Coder Social logo

Comments (9)

didikeke avatar didikeke commented on June 1, 2024

@RafaelAlbani try "Instagram.getUserFeedInfoNextPage".

from jinstagram.

RafaelAlbani avatar RafaelAlbani commented on June 1, 2024

I will try it @didikeke, thanks!

from jinstagram.

RafaelAlbani avatar RafaelAlbani commented on June 1, 2024

It worked! Thank you @didikeke for your help.

from jinstagram.

shhrohan avatar shhrohan commented on June 1, 2024

can u post a snippet.. how to make work ?

from jinstagram.

RafaelAlbani avatar RafaelAlbani commented on June 1, 2024

Sure @shhrohan, let me open my IDE and grab an example.

from jinstagram.

RafaelAlbani avatar RafaelAlbani commented on June 1, 2024

In the last versions of the library, it was introduced a new method "Instagram.getUserFollowedByListNextPage" that makes the pagination even more easy, below i provide an example:

Pagination pagination = null;

do {
    UserFeed userFeed;
    if(pagination == null) {
        userFeed = instagram.getUserFollowedByList(idProfile);
    } else {
        userFeed = instagram.getUserFollowedByListNextPage(pagination);
    }

    pagination = userFeed.getPagination();
    List<UserFeedData> users = userFeed.getUserList();

    for(UserFeedData user : users) {    
    }

} while (pagination.getNextUrl() != null);

So, basically what i do in the code above is iterating through the pages, using the "pagination.getNextUrl()" as an indicator of the final of the followers list for the the profile provided.

Let me know if it works for you.

from jinstagram.

shhrohan avatar shhrohan commented on June 1, 2024

@RafaelAlbani It worked like charm. Thanks a lot for the help 👍

from jinstagram.

shhrohan avatar shhrohan commented on June 1, 2024

one more question...
how to tell using the user id that when the user having that userid was last online or liked a photo..

from jinstagram.

RafaelAlbani avatar RafaelAlbani commented on June 1, 2024

Hum, when you say "last online" what do you really mean?

And about the like, when you retrieve the likes for a photo, you don't have the date of the like itself, so it is hard to figure out this kind of information.
You can know if the user that likes a photo is following the profile that post the photo, comparing the userid of the like with the followers that you have retrieved.

I hope it helps

from jinstagram.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.