ioshttp-redirecturiinstagraminvalid-url

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


I'm using this iOS Library https://github.com/crino/instagram-ios-sdk to login to instagram from my native app for sharing and getting feed from Instagram APIs. When i brought classes from this demo app to my project, here it is what happens:

Application successfully opens Authorization URL in safari and when i enter my credentials & authorize, it says "Safari cannot open address because its invalid" before redirecting to app or some time says "Redirect URI does not match registered URI".

Any help on this is appreciated.


Solution

  • 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