次の目的の c 構文に関するヘルプが必要です。
[error.userInfo[FBErrorParsedJSONResponseKey][@"body"][@"error"][@"type"] isEqualToString:@"OAuthException"]
何が起きてる?body、error、type リテラルはどのように使用されていますか?
完全なブロック呼び出しは次のとおりです。
[request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (!error) {
// handle successful response
} else if ([error.userInfo[FBErrorParsedJSONResponseKey][@"body"][@"error"][@"type"] isEqualToString:@"OAuthException"]) {
NSLog(@"The facebook session was invalidated");
[self logoutButtonTouchHandler:nil];
} else {
NSLog(@"Some other error: %@", error);
}
}];
次のような構文も見ました
self.userProfile = [PFUser currentUser][@"profile"];
whereuserProfile
は であり、NSDictionary
を[PFUser currentUser]
返しますPFUser
。[PFUser][@"profile]
辞書をどのように初期化しますか?