I'm trying to use the keyword search from the youtube data api v3 on my weebly site, but I can't get it to work. I followed the instructions on the javascript code samples page. I've added the "auth.js" file and the "search.js" to my project and I've plugged my user id into the "auth.js" file. I inserted the following HTML code into my page, but it doesn't work. Is something wrong with the code? I tried changing the "disabled" attribute of the search button to "enabled", but it still didn't work. If it's not the code, is it perhaps because it's a weebly site? Any suggestions or help would be appreciated. Thanks.
<!doctype html>
<html>
<head>
<title>Search</title>
</head>
<body>
<div id="buttons">
<label> <input id="query" value='cats' type="text"/><button id="search-button"
disabled onclick="search()">Search</button></label>
</div>
<div id="search-container">
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="auth.js"></script>
<script src="search.js"></script>
<script src="https://apis.google.com/js/client.js?onload=googleApiClientReady">
</script>
</body>
</html>
Here's one way:
You probably a number of issues here. Have you registered your host with the Google App Console for example https://console.developers.google.com/?
To explicitly test search, you can use the online tool in their documentation at https://developers.google.com/youtube/v3/docs/search/list#try-it
Maybe you might refine your problem space and resubmit your question?