I am finding two conflicting accounts from Google. I think because the developer guide hasn't been updated. I have received my httpClient (I think) and I am now to this point in the developer guide:
$yt = new Zend_Gdata_YouTube($httpClient, $applicationId, $clientId, $developerKey);
When I go to check my developer key and try to seach for an application id and client id I find this paragraph:
The Developer Key should be provided in every YouTube API request. Learn more Note that you no longer need to provide a Client ID with YouTube API requests. You may request an Apiary client key here.
So what should I use for the application and client IDs? I have tried leaving them blank and using arbitrary stings. Here is the error I get when I try to post a comment:
Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 401
<HTML>
<HEAD>
<TITLE>User authentication required.</TITLE>
</HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>User authentication required.</H1>
<H2>Error 401</H2>
</BODY>
</HTML>
in /home/justinrob/ZendFramework/library/Zend/Gdata/App.php:709 Stack trace:
#0 /home/justinrob/ZendFramework/library/Zend/Gdata.php(221): Zend_Gdata_App->performHttpRequest('POST', 'http://gdata.yo...', Array, '<atom:entry xml...', 'application/ato...', NULL)
#1 /home/justinrob/ZendFramework/library/Zend/Gdata/App.php(900): Zend_Gdata->performHttpRequest('POST', 'http://gdata.yo...', Array, '<atom:entry xml...', 'application/ato...')
#2 /home/justinrob/ZendFramework/library/Zend/Gdata/App.php(975): Zend_Gdata_App->post(Object(Zend_Gdata_YouTube_CommentEntry), 'http://gdata.yo...', NULL, NULL, Array)
#3 /home/justinrob/mhjrmusic.com/common/zend/tests/bootstrap.php(99): Zend_Gdata_App->insertEntry(Object(Zend_Gdata_YouTube_CommentEn in /home/justinrob/ZendFramework/library/Zend/Gdata/App.php on line 709