1

当用户启动应用程序时,我需要检查会话是否存在,我需要获取特定的用户会话信息。

提前致谢。

我的代码:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   // userNameAppdel=[[NSString alloc]init];
    // Override point for customization after application launch.

    FaceBookLoginViewController *FBObj =[[FaceBookLoginViewController alloc]init];

    coreDataManagerObj = [[CoreDataManager alloc]init];

    self.FBObj = FBObj;

    if (FBSession.activeSession.state == FBSessionStateCreatedTokenLoaded)
    {
        NSLog(@"Found a cached session");

        // I need to get user info here any one knows the solution please help.

    }


    else
    {
        UIButton *loginButton = [self.FBObj btn_FbLogin];

        [loginButton setBackgroundImage:[UIImage imageNamed:@"login_FB.png"] forState:UIControlStateNormal];
    }



    return YES;
}
4

0 回答 0