yarn add instagram-nodejs-without-api
Instagram = new Instagram()
Instagram.getCsrfToken().then((csrf) =>
{
Instagram.csrfToken = csrf;
}).then(() =>
{
Instagram.auth('inst-your-username', 'inst-your-password').then(sessionId =>
{
Instagram.sessionId = sessionId
Instagram.getUserDataByUsername('username-for-get').then((t) =>
{
Instagram.getUserFollowers(JSON.parse(t).user.id).then((t) =>
{
console.log(t); // - instagram followers for user "username-for-get"
})
})
})
})
Inst = new Instagram()
Inst.csrfToken = 'your-csrf'
Inst.sessionId = 'your-session-id'
Inst.follow(3,0) //follow "kevin"
Inst.follow(3, 1) //unfollow "kevin"
You can get user id with Inst.getUserDataByUsername() method
Star this repository on github, please. Thank you