I try to use Cookie Memory Storage but not working.
What is wrong?
var Client = require('instagram-private-api').V1;
var device = new Client.Device('myusername');
var storage = new Client.CookieMemoryStorage();
// And go for login
Client.Session.create(device, storage, 'myusername', 'mypassword')
.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
})
I try to use Cookie Memory Storage but not working.
What is wrong?