Instagram API Prevents Redirection to iOS App Upon Successful Login with 400 Bad Request Error

Instagram redirect URI doesn't match or some time safari says Cannot open because invalid address + iOS native app

You have to add URL scheme to your application's plist file, it's mentioned in short guide on github instragram page:
Make sure you've edited your application's .plist file properly, so that your applicaition binds to the ig[clientId]:// URL scheme (where [clientId] is your Instagram application CLIENT ID).

Here you'll find more information, see this article on TutsPlus: iOS SDK Working With URL Schemes

Why is Instagram showing to logins when I've only logged in once Everytime

It must have to do with session cookies. I would be storing a new session cookie instead of updating it and passing them both while validating your session. Although, I do not think this should pose a security threat unless these cookies are safe. You can verify that by inspecting the cookies passed by intercepting the requests either from the Network tab in the browser Developer Tools or by using a tool like Burp Suite or OWASP ZAP if you're looking for an open source alternative.

iOS Instagram login every time issue

For the login purpose, you can retrieve the access token for the particular use which you can store and for the every data retrieval request you can use that access token to get data without making user login again till the access token is valid

to get an access token you can follow the Instagram guide : Instagram: User Authentication

Which is like

  • Direct the user to our authorization URL. If the user is not logged
    in, they will be asked to log in. The user will be asked if they
    would like to grant your application access to her Instagram data.

  • Client Side login

For the images for another user,
If you want the public feed of the user you can get directly if you already have the username of the Instagram user by making a get request without need of authentication/access token

https://www.instagram.com/{user-name of Instagram user for which you have to retrieve the media}/media/ 

Ex: https://www.instagram.com/instagram/media/ , this will return json with the public feed images



Related Topics



Leave a reply



Submit