iphone - Facebook Ios sdk logging in -



iphone - Facebook Ios sdk logging in -

i trying create function ios facebook sdk able login , if logged in able see nslog string "logged in". not seeing string @ all. also, login seems working fine in terms of pushing button , seeing facebook app , pressing ok continue. can inform me on doing wrong?

-(ibaction)popbutton:(id)sender { tuappdelegate *appdelegate = (tuappdelegate *)[[uiapplication sharedapplication] delegate]; // button's job flip-flop session open closed if (appdelegate.session.isopen) { // if user logs out explicitly, delete cached token information, , next // time run applicaiton presented log in ux again; // users close app or switch away, without logging out; // cause implicit cached-token login occur on next launch of application [appdelegate.session closeandcleartokeninformation]; } else { if (appdelegate.session.state != fbsessionstatecreated) { // create new, logged out session. appdelegate.session = [[fbsession alloc] init]; } // if session isn't open, let's open , nowadays login ux user [appdelegate.session openwithcompletionhandler:^(fbsession *session, fbsessionstate status, nserror *error) { // , here create sure update our ux according new session state [self updateview]; }]; } } - (void)updateview{ // app delegate, can reference session property tuappdelegate *appdelegate = (tuappdelegate *)[[uiapplication sharedapplication] delegate]; if (appdelegate.session.isopen) { nslog(@"logged in"); } else { nslog(@"not logged in"); } }

i suspect you've missed @ to the lowest degree step 2d, wiring openurl facebook sdk:

https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/authenticate/

... said, have missed more. if seeing app 1 time again after login suspect you've added url scheme info.plist, otherwise check also.

iphone ios objective-c facebook

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -