Open khanakhun opened 3 years ago
const Instagram = require('instagram-web-api') require('dotenv').config(); const FileCookieStore = require('tough-cookie-filestore2')
const username = '' const password = ''
const cookieStore = new FileCookieStore('./cookies.json') const client = new Instagram({ username , password , cookieStore });
(async () => { await client.login() const profile = await client.getProfile(); const user = await client.getActivity(); console.log(user) // console.log(username) console.log(profile)
const followers = await client.getFollowers({ userId: '36517218556' , first : 150 }) console.log(followers)
})()
Possible duplicate of #92, you need to use the after parameter. See this solution.
after
const Instagram = require('instagram-web-api') require('dotenv').config(); const FileCookieStore = require('tough-cookie-filestore2')
const username = '' const password = ''
const cookieStore = new FileCookieStore('./cookies.json') const client = new Instagram({ username , password , cookieStore });
(async () => { await client.login() const profile = await client.getProfile(); const user = await client.getActivity(); console.log(user) // console.log(username) console.log(profile)
const followers = await client.getFollowers({ userId: '36517218556' , first : 150 }) console.log(followers)
})()