whizzzkid / instagram-proxy-api

CORS compliant API to access Instagram's public data
https://nishantarora.in/building-your-image-gallery-using-public-instagram-API.naml
261 stars 48 forks source link

404 error on user account feeds #25

Closed sebastianthulin closed 6 years ago

sebastianthulin commented 6 years ago

Twitter tells me that the Instagram api has changed. I'm willing to fix this, but cannot find any related documentation on what has been changed.

Twitter: https://twitter.com/wpilimon/status/973637645816532992, https://twitter.com/ItsAhTrap/status/973652845504315392

Heroku log entry: 2018-03-15T12:32:49.238700+00:00 heroku[router]: at=info method=GET path="/filbornaskolanselevkar/media?count=20" host=*.herokuapp.com request_id=e2bed8cb-392f-4809-bd4b-333481288b78 fwd="**" dyno=web.1 connect=0ms service=511ms status=404 bytes=12222 protocol=https

whizzzkid commented 6 years ago

@sebastianthulin The demo in the readme http://plnkr.co/edit/4oCwpbMm6p9cyJb1UWld?p=preview seems to work.

However the legacy code seems to be failing. That's because the response from https://www.instagram.com/filbornaskolanselevkar/?__a=1 changed and the change needs to be here https://github.com/whizzzkid/instagram-proxy-api/blob/master/app.js#L373 instead of json.user.id it would be json.graphql.user.id

Lemme know if this does not work, submit a PR I'll approve the changes.

whizzzkid commented 6 years ago

Ok so @sebastianthulin you didn't revert so I pushed a fix. It was a one liner. Everything should work now.

BTW, you can look into the new response coming with __a=1 it has a cursor and some posts, maybe they can be leveraged.

Closing this for now.

sebastianthulin commented 6 years ago

Hi! I'm sorry for the slow response. It was night-time here. Thank you for patching this issue. Have a grate weekend!