1

When ever user launches the app i need to check the session if session exist i need to get the particular user sessions info.

Thanks in Advance.

My code:

- (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;
}
Peer Mohamed Thabib
  • 636
  • 2
  • 9
  • 29

0 Answers0