执行FQLRequest时出错

时间:2011-09-11 22:27:11

标签: ios facebook facebook-fql fbrequest-form

我在视图控制器中通过特定方法执行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]);
};

对你们中的某些人来说,它会响铃吗?

谢谢:)

0 个答案:

没有答案