ios - Facebook SDK 3.2 login only works if app does not terminate -


my facebook login works if not exit app in order login. example, works if app logs in ios6 native dialog or forced web view. when try log in using safari or facebook app, show me page says have authorized app. click "ok" , takes me app, login did not complete.

any ideas? have been stuck on long time...

thanks in advance!

below code use log in. if force web view, login work since not have switch out of application log in, doing every time user not seem efficient.

 fbsession *session = [[fbsession alloc] initwithappid:@"12345"                      permissions:nil                  urlschemesuffix:@"paid"               tokencachestrategy:nil];  if (allowloginui ||     (session.state == fbsessionstatecreatedtokenloaded)) {     [fbsession setactivesession:session];     [session openwithbehavior:fbsessionloginbehaviorwithfallbacktowebview             completionhandler:      ^(fbsession *session, fbsessionstate state, nserror *error) {          [self sessionstatechanged:session state:state error:error];      }];     result = session.isopen; } 

have implemented - application:openurl:sourceapplication:annotation: in app delegate, declared app support url scheme fb[your app id] , wired things app delegate call-in gets [[fbsession activesession] handleopenurl:url]?

the way external web view works if login successful attempts open url app-specific scheme includes login token. you're supposed have set app handler url scheme , pass relevant url facebook sdk can decode token.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -