Anyone see this?
I've a situation whereby sometimes, [session resume] returns YES. I make a FBRequest.call, and the error delegate gets called. The error has 102 "Session key invalid or no longer valid". However, if within the same session I call up any FBDialogs (e.gr. to publish to a stream), these all work fine. I don't 开发者_运维问答see why they are not suffering the same error.Any ideas?
Yes. I know there's a forum for facebook connect, but its taking an age to get my password sent to me. (Yes...there's an irony there - why didn't they just use facebook connect for their forums...ho hum).
- (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 of that method, I don't think that the code is trying to make the connection with facebook to test, they just get the expiration date. I think that sometimes, when you logout of facebook, the session does not expire but on server side, they delete your session
精彩评论