shyambhat / InstagramKit

The unofficial Instagram iOS SDK
MIT License
970 stars 266 forks source link

getUserDetails/getSelfUserDetailsWithSucess/getMediaForUser response is bad request (400) with all of them #251

Open Uncpy opened 8 years ago

Uncpy commented 8 years ago

Hey, I'm currently working on app, which uses this wrapper for Instagram. Instagram used to work and stopped about 2-3 months ago. There were no changes in code, redirect starts with http:// and app passed Review, so it looks like everything is fine. I receive access token, user is authenticated, but methods from title stopped working.

Could you try to help me resolving this problem? :)

Kingson commented 7 years ago

I have the same issue.

shyambhat commented 6 years ago

Instagram has deprecated some of their API endpoints. Unfortunately there's nothing we can do from our side.

InstagramKit v4.0 makes these deprecated APIs unavailable and adds ability to look into the detailed response body the server sends. (#240)

Could you please update to the latest pod and inspect the response bodies of the response?

alexeydonov commented 5 years ago

The problem is the endpoint for getSelfUserDetails getting URL-encoded so it looks like https://api.instagram.com/v1/users%2Fself?access_token=... instead of https://api.instagram.com/v1/users/self?access_token=...

Instagram just stopped tolerating incorrectly encoded URLs

kkak10 commented 5 years ago

@alexeydonov @shyambhat

I think this PR can solve the problem.

285