我通过特定方法在视图控制器中执行 FQL 请求。这是我的要求。
NSString* fql = [[NSString alloc] init];
fql = [NSString stringWithFormat:@"SELECT uid, name FROM user WHERE uid IN(SELECT uid FROM event_member WHERE eid= %@) AND sex='female'", event_id];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObject:fql forKey:@"query"];
[[Facebook shared] requestWithMethodName:@"fql.query" andParams:params andHttpMethod:@"POST" andDelegate: self];
[fql release];
但是,当我第二次启动我的请求时,我在使用 NSZombieEnabled 时遇到了该错误:
-[CFString release]:消息发送到释放的实例 0x4cb9ec0
线程指向 FBRequest.m 中的[ _params release]
当尝试更改请求时
fql = @"SELECT uid, name, sex FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND sex = 'male'";
我不再有错误。
这是 fbrequest 委托方法
- (void)request:(FBRequest *)request didReceiveResponse:(NSURLResponse *)response {
NSLog(@"FBRequestDelegate Received response");
}
- (void)request:(FBRequest *)request didLoad:(id)result {
NSLog(@"FBRequestDidLoad Received response");
self.allListProfils = result;
NSLog(@"all listprofil :%@", allListProfils);
[self resetSearch];
[DSBezelActivityView removeViewAnimated:YES];
moreButton.hidden = NO;
[table reloadData];
};
- (void)request:(FBRequest *)request didFailWithError:(NSError *)error {
NSLog(@"FBRequestDidFailWithError Received response, Error is : %@",[error description]);
};
它对你们中的一些人敲响了警钟吗?
谢谢 :)