当用户启动应用程序时,如果会话存在,我需要检查会话,我需要获取特定的用户会话信息。
先谢谢。
我的代码:
- (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;
}