- (BOOL)resume {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
FBUID uid = [[defaults objectForKey:@"FBUserId"] longLongValue];
if (uid) {
NSDate* expirationDate = [defaults objectForKey:@"FBSessionExpires"];
if (!expirationDate || [expirationDate timeIntervalSinceNow] > 0) {
_uid = uid;
_sessionKey = [[defaults stringForKey:@"FBSessionKey"] copy];
_sessionSecret = [[defaults stringForKey:@"FBSessionSecret"] copy];
_expirationDate = [expirationDate retain];
for (id<FBSessionDelegate> delegate in _delegates) {
[delegate session:self didLogin:_uid];
}
return YES;
}
}
return NO;
}
Here is the code for this method, I don’t think the code is trying to connect to Facebook to check, they just get an expiration date. I think that sometimes when you log out of facebook, the session does not expire, but on the server side they delete the session
source
share