IOS开发Facebook直播,为什么只能获得直播评论ID,没有直接访问评论人的昵称

时间:2017-11-22 03:43:49

标签: facebook

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);
        }

1 个答案:

答案 0 :(得分:0)

我已经解决了

FBSDKGraphRequest * request = [[FBSDKGraphRequest alloc] initWithGraphPath:path parameters:@ {@" fields" :@""} HTTPMethod:@" GET"];

根据此处的更改