After a few days using cookie ig_pr two days ago is block. Looks like the only way to get the data now is use sessionid w
The main problem with using graph/query is that I only have the username, to extract the userId & the last post like we use to do with ?__a=1 we have to get the instagram's user page & extract _sharedData
Javascript
let url = "https://www.instagram.com/"+username;
$.ajax({
type: 'GET',
url: url,
error: function () {
//..
},
success: function (data) {
data = JSON.parse(data.split("window._sharedData = ")[1].split(";")[0]).entry_data.ProfilePage[0].graphql;
console.log(data);
}
})
After get all this data we can call graph/query (not in client side)