2012-09-19 107 views
1

認證使用Facebook ID,Facebook的SDK,IOS

FBSessionLoginBehavior behavior = FBSessionLoginBehaviorForcingWebView; 
appDelegate.session    = [[FBSession alloc] init]; 

[appDelegate.session openWithBehavior:behavior 
        completionHandler:^(FBSession *session, FBSessionState status, NSError *error) { 
         NSLog(@"session is %d",session.state); 
         [self dismissViewControllerAnimated:YES completion:nil]; 


        } 
]; 

做使用Facebook的身份驗證後,我總是得到

session is 513 

問:

what is the meaning of 513 

請協助我關於這個問題。謝謝

回答

2

FBSession.state = 513是FBSessionStateOpen。 我找不到任何文件,解釋這一點,可能的會話狀態是:(發現它在iOS的FacebookSDK)

FBSessionStateCreated     = 0, 
FBSessionStateCreatedTokenLoaded  = 1, 
FBSessionStateCreatedOpening   = 2, 
FBSessionStateOpen      = 1 | FB_SESSIONSTATEOPENBIT, 
FBSessionStateOpenTokenExtended   = 2 | FB_SESSIONSTATEOPENBIT, 
FBSessionStateClosedLoginFailed   = 1 | FB_SESSIONSTATETERMINALBIT, // NSError obj 
FBSessionStateClosed     = 2 | FB_SESSIONSTATETERMINALBIT, // " 

的數字是錯誤的,但狀態是正確的。嘗試「po session.state」,你會選擇枚舉值。