0

为什么我在首选项同步后立即收到内存警告?谢谢。

- (void)fbDidLogin {
    NSLog(@"Did Log In");
    NSLog(@"Access Token is %@", shared.accessToken );
    NSLog(@"Expiration Date is %@", shared.expirationDate );

    NSString *accessToken = shared.accessToken;
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    NSString *expirationDate =[dateFormatter stringFromDate:shared.expirationDate ];

    **NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
    [prefs setObject:accessToken forKey:@"facebook-accessToken"];
    [prefs setObject:expirationDate forKey:@"facebook-expirationDate"];
    [prefs synchronize];**

    [[NSNotificationCenter defaultCenter] postNotificationName:@"FBDidLoginCalled" object:nil];
}
4

0 回答 0