本文介绍了访问未配置的YouTube API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在尝试添加将YouTube中的某些视频观看到我正在创建的iOS应用中的功能。我有一个来自Google的API密钥,并且已根据评论提示从开发者控制台启用了YouTube API。这不是问题。I am attempting to add the ability to view certain videos from YouTube into an iOS app I am creating. I have an API key from Google and have enabled the YouTube API from the Developer Console, as comments are suggesting. This is not the issue.我有一个非常简单的方法,从它的ID收集特定YouTube频道的详细信息,然后我将用它来查找所有频道上传的视频。我遇到的问题是它说我的Access没有配置。以下是我所做的一切:I have a very simple method that collects the details of a specific YouTube channel from it's ID which I will then use to find all of that channels uploaded videos. The issue I'm having is it says my Access is not Configured. Here is everything I have done:获取信息的方法(显然我没有包含我的密钥或渠道ID):The method to grab the information (obviously I haven't included my key or the channel ID there):- (void)collectChannelData {GTLServiceYouTube *service = [[GTLServiceYouTube alloc] init];service.APIKey = @"API_KEY";GTLQueryYouTube *query = [GTLQueryYouTube queryForChannelsListWithPart:@"contentDetails"];query.channelId = @"CHANNEL_ID";GTLServiceTicket *ticket = [service executeQuery:query completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { if (!error) { GTLYouTubeChannelListResponse *channelItem = object; NSLog(@"%@", channelItem); } else { NSLog(@"%@", error); }}]; }我确保已在Google Developer Console中启用了YouTube Data API v3,并且Bundle Identifier与我的Info.plist中的内容匹配I have ensured the the YouTube Data API v3 has been switched on in the Google Developer Console, and the Bundle Identifier matches what is in my Info.plist我收到的错误消息是:我找不到任何理由不这样做。我认为我是正确的,因为我不需要为此特定请求设置结算帐户或需要oAuth。我还可以在Developer Console上的应用程序概述中看到已收到多个请求,但每个请求都有错误。我只是想不通为什么拒绝它。I cannot find any reason why this would not work. I believe I am correct in that I should not need to set up a billing account or need oAuth for this specific request. I can also see in the overview for my app on the Developer Console that multiple requests have been received but there is an error for each request. I just can't figure out why it's rejecting it.感谢您的帮助。推荐答案 Bundle标识符存在已知问题,请暂时省略,它应该可以正常工作。There is a known issue with Bundle identifier, please omit it for now, and it should work.您可以在此处跟踪问题: https://code.google.com/p/gdata-issues/issues/detail?id = 5770You can track the issue here: https://code.google.com/p/gdata-issues/issues/detail?id=5770 这篇关于访问未配置的YouTube API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-28 08:46