Help with this..... I keep getting this error. Please what am i doing wrong?


#1

// Your use of the YouTube API must comply with the Terms of Service:
// https://developers.google.com/youtube/terms

// Helper function to display JavaScript value on HTML page.
function showResponse(response) {
var responseString = JSON.stringify(response, '', 2);
document.getElementById('response').innerHTML += responseString;
}

// Called automatically when JavaScript client library is loaded.
function onClientLoad() {
gapi.client.load('youtube', 'v3', onYouTubeApiLoad);
}

// Called automatically when YouTube API interface is loaded (see line 9).
function onYouTubeApiLoad() {
// This API key is intended for use only in this lesson.
// See https://goo.gl/PdPA1 to get a key for your own applications.
gapi.client.setApiKey('AIzaSyCR5In4DZaTP6IEZQ0r1JceuvluJRzQNLE');

// Add code here to test out showResponse():
onYouTubeApiLoad.showResponse("Hooray!");

}

"Oops, try again. Please call the showResponse() function once the YouTube API client interface is loaded." ........


#2

ignore. i figured it out.......

Had this written:
// Add code here to test out showResponse():
onYouTubeApiLoad.showResponse("Hooray!");

instead of:
// Add code here to test out showResponse():
showResponse("Hooray!");