dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.99k stars 1.14k forks source link

Unable to run basic Session code from ReadMe. #170

Closed nilutpol closed 7 years ago

nilutpol commented 7 years ago

When I run the below code from the readme by replacing someuser with my username and password.

var Client = require('instagram-private-api').V1; var device = new Client.Device('someuser'); var storage = new Client.CookieFileStorage(__dirname + './cookies/someuser.json');

// And go for login Client.Session.create(device, storage, 'someuser', 'somepassword') .then(function(session) { // Now you have a session, we can follow / unfollow, anything... // And we want to follow Instagram official profile return [session, Client.Account.searchForUser(session, 'instagram')]
}) .spread(function(session, account) { return Client.Relationship.create(session, account.id); }) .then(function(relationship) { console.log(relationship.params) // {followedBy: ... , following: ... } // Yey, you just followed @instagram })

Unhandled rejection RequestError: Your version of Instagram is out of date. Please upgrade your app to log in to Instagram.

is thrown. Please help.

roysG commented 7 years ago

Why this is closed without any response it also happen to me, right now, till yasterday everything was ok, what happen?

nilutpol commented 7 years ago

i think it worked for me somehow. Dont remember now :) Please create a new thread if it still happens for you.

roysG commented 7 years ago

In your cash you did not enter username and password so it throw error, in my case is different, does it works for you right now?

If yes what is the version of your package? Thanks.

igimenez commented 7 years ago

@roysG Did you change 'someuser' (3 places) with a valid username and 'somepassword' with the actual valid password. I just test it yesterday and it worked.

roysG commented 7 years ago

Hi, yes i changed it, on my home computer there is nobproboem, but t when i run it on my server, the same code, i get this error.