Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error when trying to retrieve comments #120

Closed
th4deu opened this issue Jun 13, 2017 · 5 comments
Closed

404 error when trying to retrieve comments #120

th4deu opened this issue Jun 13, 2017 · 5 comments
Assignees
Labels

Comments

@th4deu
Copy link

th4deu commented Jun 13, 2017

Hello there,

I've tried to retrieve comments and I get a 404 error.
I tried all the tests ppl have done here before and it's still not working.

Here are the parameters sent (i replaced the session and csrftoken data):
url: https://www.instagram.com/query/
Array
(
[cookie] => target=""; csrftoken=#mytoken#; rur=ATN; ds_user_id=#myuserid#; sessionid=#session#; mid=WT9hkAAEAAGKufsJuvVjifCevOwz;
[referer] => https://www.instagram.com/
[x-csrftoken] => #mytoken#
)

parameters: ig_shortcode(BUF8XiRjFzP){comments.last(10){count,nodes{id,created_at,text,user{id,profile_pic_url,username,follows{count},followed_by{count},biography,full_name,media{count},is_private,external_url,is_verified}},page_info}}<

The code i'm using is like it was specified here:
$instagram = Instagram::withCredentials('user', 'pass');
$instagram->login();
$comments = $instagram->getMediaCommentsByCode('code', 10);

@nsht
Copy link

nsht commented Jun 14, 2017

It seems the query url is now https://www.instagram.com/graphql/query/ , since by inspecting the network connections from Instagram, I can't seem to find the /query url.But it is not working even after replacing the query url in the Endpoints.php file.

@th4deu
Copy link
Author

th4deu commented Jun 14, 2017

Yes, I saw that. After a time, I created a function to retrieve the comments in two steps.
They changed the comments/json structure too, so, if is there a way to contribute to this project with this new structure let me know.
Maybe it's something temporary.

@raiym
Copy link
Member

raiym commented Jun 14, 2017

@th4deu do you know what is query_id?

@th4deu
Copy link
Author

th4deu commented Jun 14, 2017

Ah, it's a number they generate. I tried some random numbers with the same length but it didn't work, so I tried to use a number they're using and it's working 'til now.
i changed the code 2 days ago and it didn't expire yet, and I think it won't...

@raiym
Copy link
Member

raiym commented Jun 14, 2017

@th4deu thank you
I will fix it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants