Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Why is 'gapi.client.youtube' from Youtube Data Api V3 undefined?

$
0
0

I try to use the Youtube Data Api V3 with javascript

So i have this simple code :

<script src="https://apis.google.com/js/client.js?onload=googleApiClientReady"></script>        <script type="text/javascript">    $(window).load(function(){         var viewCount, channelName, subscribers;        gapi.client.load('youtube', 'v3');        var request = gapi.client.youtube.channels.list({            part: 'statistics',            forUsername : 'GameSprout'        });        alert(request);        alert("test");    });</script>

But i have this error :

TypeError: gapi.client.youtube is undefined

How can i fix that ?


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>