instagram-private-api icon indicating copy to clipboard operation
instagram-private-api copied to clipboard

The way to get user presence of all the followers

Open kiyu-git opened this issue 2 years ago • 0 comments

General Question

Is there any way to get user presence of all the followers? this issue is related to here.

Notes

I have learned that it is possible to get a list of users online using direct.getPresence(). However, this only returns the status of some users (a dozen or so, not all).

Is it possible to get the user presence of all followers, for example, by using a Cursor method, like the one shown here?

Form

Put an [x] if you meet the condition, else leave [ ].

Code

const presences = await ig.direct.getPresence();
const userIds = Object.keys(presences["user_presence"]);
userIds.forEach(async (userId) => {
    const userPresence = presences["user_presence"][userId];
    console.log(userPresence["is_active"], new Date(userPresence["last_activity_at_ms"]).toString());
});

kiyu-git avatar Feb 26 '24 19:02 kiyu-git