NSString * path = [NSString stringWithFormat:@“/%@ / comments”,liveId]; FBSDKGraphRequest * request = [[FBSDKGraphRequest alloc] initWithGraphPath:path parameters:@ {@“fields”:@“attachment_id,attachment_share_url,attachment_url,is_offline,message,text”}]; NSMutableArray * mArr = [NSMutableArray array]; [request startWithCompletionHandler:^(FBSDKGraphRequestConnection * connection,id result,NSError * error){ if(!error){
if (result) {
NSArray *arr = [result objectForKey:@"data"];
for (NSDictionary *dic in arr) {
EVOLiveItem *commentItem = [[EVOLiveItem alloc] init];
commentItem.commentItem.userName = dic[@"id"];
commentItem.commentItem.commentContent = dic[@"message"];
[mArr addObject:commentItem];
}
completion(mArr);
}
答案 0 :(得分:0)
我已经解决了
FBSDKGraphRequest * request = [[FBSDKGraphRequest alloc] initWithGraphPath:path parameters:@ {@" fields" :@""} HTTPMethod:@" GET"];
根据此处的更改