javascript - Google API Sample not Loading -
i'm trying use sample code from: https://developers.google.com/youtube/analytics/v1/sample-application
however, when open html file won't load. firebug says "google not defined" , references line 17 of index.js file, is:
google.load('visualization', '1.0', {'packages': ['corechart']});
this leads me believe isn't loading or isn't finished loading time index.js is. read other similar posts talked forcing browser wait scripts load before moving on, i'm novice understand talking about.
since i'm copying sample code 3 files (index.html, index.js, index.css) (although add in oauth key in index.js) i'm hoping able replicate , see mean.
you need import google jsapi before attempt load visualisation package. make sure following line appears in document:
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
if copy paste entire contents of the online example works properly.
Comments
Post a Comment