SwiftInstagram icon indicating copy to clipboard operation
SwiftInstagram copied to clipboard

Not redirecting to other page after successful login

Open dineshguptha opened this issue 7 years ago • 11 comments

Hello, after successful login page is not redirecting to root view controller. simulator screen shot - iphone 8 plus - 2018-06-11 at 17 29 37

dineshguptha avatar Jun 11 '18 12:06 dineshguptha

let api = Instagram.shared // Login api.login(from:self.navigationController!, withScopes: [.publicContent], success: { // Do your stuff here ... }, failure: { error in print(error.localizedDescription) }) This Is the code am using for login.

dineshguptha avatar Jun 11 '18 12:06 dineshguptha

I am using the same code and it is working for me, are you redirected to different ViewController? if so, make sure that the desired viewController is also the root

MalkaBar avatar Jun 11 '18 19:06 MalkaBar

Same @dineshguptha problem... This issue appear without many reason while worked fine before and nothing change in my code...

MapleNoise avatar Jun 19 '18 13:06 MapleNoise

Same problem on my side. I guess it’s related to changes that were done on Instagram API

ranhsd avatar Jun 30 '18 07:06 ranhsd

hello, I am facing a similar issue: I have used the same code of Dinesh and just after tapping the save info button, I got the following page of the InstagramViewController. Anyway, the navigation controller does not pop the view controller and going back bring to the previous view controller without getting the success handler called simulator screen shot - iphone se - 2018-07-19 at 18 24 13

miniapps-ios avatar Jul 19 '18 16:07 miniapps-ios

I just tested it and had no problem. Are you guys unchecking the "Disable implicit OAuth" option in the Instagram client? (https://github.com/AnderGoig/SwiftInstagram/wiki/Authentication#swiftinstagram-authentication)

AnderGoig avatar Jul 22 '18 21:07 AnderGoig

FWIW, I'm seeing this behavior if I attempt to use the "Continue with Facebook" option on the login screen. If I'm logging in with a username/password, it behaves as expected.

emcphersonburke avatar Jul 30 '18 01:07 emcphersonburke

@AnderGoig I have the same issue like @panchsheelmind I really have no idea what I am doing wrong, but its simply loading instagram first screen... "Disable implicit OAuth" is disabled, but I have no idea why I need redirect URI . I just put simply put https://thispic.io/ but no idea if it affects.

I entered in sdk and printed url, then opened in browser, and it redirected succesffully to: http://www.thispic.io/#access_token=7276677373.b4ceae8.e33aa2d3e0d0451c83a8391896d93e71 which is fine, I think. But in app, its not working.

Any idea ?

Really appreciate your help.

AndreiBoariu avatar Aug 02 '18 22:08 AndreiBoariu

Maybe this will help

13

ArmyXomuiL avatar Sep 01 '18 22:09 ArmyXomuiL

Any update on this?

maakle avatar Sep 13 '18 03:09 maakle

For some reasons, seems its not working ok. Here is one case: If IG found unsecure login, they will send you a code, you enter code corectly, and no callback back to app, only it loads www.instagram.com in that webView.

Anyway, @AnderGoig did a very great job here, but IG messed everything.

AndreiBoariu avatar Sep 14 '18 08:09 AndreiBoariu