【问题标题】:IOS development Facebook live, why can only get to live comment id, no direct access to comment on people's nicknameiOS开发Facebook直播,为什么只能获取直播评论id,无法直接获取评论人昵称
【发布时间】:2017-11-22 03:43:48
【问题描述】:

NSString *path = [NSString stringWithFormat:@"/%@/cmets",liveId]; FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:路径参数:@{@"fields" : @"attachment_id,attachment_share_url,attachment_url,is_offline,message,text"}]; NSMutableArray *mArr = [NSMutableArray 数组]; [请求 startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *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);
        }

【问题讨论】:

标签: facebook


【解决方案1】:

我已经解决了

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:路径参数:@{@"fields" : @""} HTTPMethod:@"GET"];

这里的改动下

【讨论】:

    猜你喜欢
    • 2020-05-23
    • 1970-01-01
    • 2014-01-23
    • 2017-05-27
    • 2016-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-02
    相关资源
    最近更新 更多