페이스 북 이름과 그림을 동시에 가져 오는 데 문제가 있습니다. 나는 그 중 한 명만 각 요청을 할 수있다. (FBRequest *) 요청 didLoad : (ID (무효) 요청 - 내가 두 요청 Facebook 프로필 이름 및 사진 IOS 5.1
-(void)fbDidLogin{
// Save the access token key info.
[self saveAccessTokenKeyInfo];
// Get the user's info.
[facebook requestWithGraphPath:@"me/picture" andDelegate:self];
[facebook requestWithGraphPath:@"me" andDelegate:self];
}
와 같은과
으로 접근하는 경우-(void)fbDidLogin{
// Save the access token key info.
[self saveAccessTokenKeyInfo];
// Get the user's info.
[facebook requestWithGraphPath:@"me/?fields=first_name,picture" andDelegate:self];
}
-(void)request:(FBRequest *)request didLoad:(id)result{
if ([result isKindOfClass:[NSArray class]]) {
result = [result objectAtIndex:0];
if ([result objectForKey:@"first_name"]) {
[lblUser setText:[NSString stringWithFormat:@"Welcome %@!", [result objectForKey:@"first_name"]]];
// Show the publish button.
[btnPublish setHidden:NO];
}
}
else {
imageView.image = [UIImage imageWithData:result];
}
}
오류는 내가
__NSCFDictionary length]: unrecognized selector sent to instance
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary length]: unrecognized selector sent to instance
를 얻을 수) 결과 오류가 발생했습니다
[__NSCFDictionary length]: unrecognized selector sent to instance
그래서 페이스 북 이름과 그림을 요청하고 수신 데이터를 어떻게 처리 할 수 있습니까?
난 페이스 북의 응답 난 그냥 변경 사전에 생각하지 말아 이것과 그것의 작품 if ([result isKindOfClass : [NSArray class]] –