Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/449.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Google youtube API无法使用错误请求和无效密钥登录_Javascript_Jquery_Ajax_Youtube Data Api - Fatal编程技术网

Javascript Google youtube API无法使用错误请求和无效密钥登录

Javascript Google youtube API无法使用错误请求和无效密钥登录,javascript,jquery,ajax,youtube-data-api,Javascript,Jquery,Ajax,Youtube Data Api,Google youtube API无法使用错误请求和无效密钥登录 我在谷歌控制台上更新了几次我的凭证 多次更改API密钥,但问题是相同的。 我使用的代码是: var channelname='mipaltan'; $(文档).ready(函数(){ $.get(”https://www.googleapis.com/youtube/v3/channels", { 第部分:“内容详细信息”, forUsername:'mipaltan', 关键词:“Aizasyct8KxAXJ2L29VYG4

Google youtube API无法使用错误请求和无效密钥登录 我在谷歌控制台上更新了几次我的凭证

多次更改API密钥,但问题是相同的。 我使用的代码是:

var channelname='mipaltan';
$(文档).ready(函数(){
$.get(”https://www.googleapis.com/youtube/v3/channels", {
第部分:“内容详细信息”,
forUsername:'mipaltan',
关键词:“Aizasyct8KxAXJ2L29VYG4HBDY36H PhAH Teg”
},
功能(数据){
$.each(data.item,function(i,item){
控制台日志(项目);
pid=item.contentDetails.relatedPlaylists.uploads;
getVids(pid);
})
}
);
函数getVids(pid){
$.get(”https://www.googleapis.com/youtube/v3/playlistItems", {
部分:'代码片段',
最大结果:10,
playlid:pid,
关键词:“Aizasyct8KxAXJ2L29VYG4HBDY36H PhAH Teg”
},
功能(数据){
var输出;
$.each(data.items,function(i,item){
控制台日志(项目);
vidsTitle=item.snippet.title;
输出=“
  • ”+vidsTitle+”
  • ”; //附加到结果 $(“#结果”)。追加(输出); }) } ); } });
    
    获取视频标题
    身体{
    背景#f4;
    字体系列:Arial,无衬线;
    字体大小:14px;
    颜色:#666;
    }
    #容器
    {
    宽度:100%;
    高度:自动;
    溢出:自动;
    保证金:自动;
    填充:15px;
    }
    YouTube视频标题
    

      其项不是项,播放ID不是播放ID

      var channelname='mipaltan';
      $(文档).ready(函数(){
      $.get(”https://www.googleapis.com/youtube/v3/channels", {
      第部分:“内容详细信息”,
      forUsername:'mipaltan',
      关键词:“Aizasyct8KxAXJ2L29VYG4HBDY36H PhAH Teg”
      },
      功能(数据){
      $.each(data.items,function(i,item){
      pid=item.contentDetails.relatedPlaylists.uploads;
      getVids(pid);
      })
      }
      );
      函数getVids(pid){
      $.get(”https://www.googleapis.com/youtube/v3/playlistItems", {
      部分:'代码片段',
      最大结果:10,
      playlid:pid,
      关键词:“Aizasyct8KxAXJ2L29VYG4HBDY36H PhAH Teg”
      },
      功能(数据){
      $.each(data.items,function(i,item){
      vidsTitle=item.snippet.title;
      输出=“
    • ”+vidsTitle+”
    • ”; //附加到结果 $(“#结果”)。追加(输出); }) } ); } });
      正文{
      背景#f4;
      字体系列:Arial,无衬线;
      字体大小:14px;
      颜色:#666;
      }
      #容器{
      宽度:100%;
      高度:自动;
      溢出:自动;
      保证金:自动;
      填充:15px;
      }
      
      YouTube视频标题
      

        非常感谢亲爱的朋友们,我不会忘记你们,别忘了点击我答案旁边的绿色复选框接受它