【发布时间】:2015-03-06 08:17:37
【问题描述】:
如何使用 YouTube API v3 在 iOS 中评价(不喜欢/喜欢)其他人在 YouTube 上的视频?
我从the documentation 不明白该怎么做。
【问题讨论】:
标签: ios youtube-data-api
如何使用 YouTube API v3 在 iOS 中评价(不喜欢/喜欢)其他人在 YouTube 上的视频?
我从the documentation 不明白该怎么做。
【问题讨论】:
标签: ios youtube-data-api
我自己找到了答案,
-(void) rateVideo
{
GTLQueryYouTube *query = [GTLQueryYouTube queryForVideosRateWithIdentifier:videoId rating:@"dislike"]; // rating can be anything "like" or "dislike" etc
[_youTubeService executeQuery:query completionHandler:^(GTLServiceTicket *ticket, GTLYouTubeVideoRating *rate, NSError *error) {
NSLog(@"err : %@",error);
}];
}
【讨论】: