【问题标题】:How to get/submit comments of any youtube video using "google-api-objectivec-client"如何使用“google-api-objectivec-client”获取/提交任何 youtube 视频的评论
【发布时间】:2014-02-13 13:54:13
【问题描述】:

我正在使用

[google-api-objectivec-client] (https://code.google.com/p/google-api-objectivec-client/)

我想获取任何 youtube 视频的 cmets。如果有人尝试过,请指导我该怎么做。

这是我获取最受欢迎视频的代码

- (void)getMostPopularOnCompletion:(void (^)(void))completion withCurrentUserChannel:(GTLYouTubeChannel*)currentUserChannel{

    mostPopularFlag = YES;
    hud = [MBProgressHUD showHUDAddedTo:self.revealController.navigationController.view animated:YES];
    hud.mode = MBProgressHUDModeIndeterminate;
    hud.labelText = @"Loading";

    GTLQueryYouTube *videoQuery = [GTLQueryYouTube queryForPlaylistItemsListWithPart:@"id, snippet, contentDetails, statistics" Chart:@"mostPopular"];
    videoQuery.maxResults = 50;

    //    if(nextPageToken){
    //        videoQuery.pageToken = nextPageToken;
    //    }

    [_menu.youtubeService executeQuery:videoQuery
                     completionHandler:^(GTLServiceTicket *ticket, GTLYouTubeVideoListResponse *object, NSError *error) {
                         _mostPopularVideos = [object.items mutableCopy];
                         _mostPopularVideosOriginal = [object.items mutableCopy];
                         [_filterSegmentO setSelectedSegmentIndex:0];
                         [_mainTableView setAccessibilityHint:@"0"];
                         [hud hide:YES];
                         hud=nil;
                         [_mainTableView setTag:0];
                         [_mainTableView reloadData];
                         for (int i = 0; i < object.items.count; i++) {
                             GTLYouTubeVideo *video = object.items[i];
                             [self getChannelImage:video.snippet.channelId];
                         }

                        if (completion){
                             completion();
                         }
                     }];
}

【问题讨论】:

    标签: ios objective-c youtube-api xcode5


    【解决方案1】:

    Data API v3 尚不支持评论读/写(基于 objc-client)。但是你可以read through the old API

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-01-06
      • 2014-10-05
      • 2017-04-16
      • 2016-04-08
      • 1970-01-01
      • 2013-11-26
      • 2020-11-01
      • 2015-09-02
      相关资源
      最近更新 更多