Wednesday, February 29, 2012

[YouTube-API] Re: Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 403 yt:quotatoo_many_recent_calls'

that tells me nothing. I havn't even tried to use the code to get it
to reset, but i still get the same error!!

What else can i look for??

On Feb 28, 4:03 pm, Jeffrey Posnick <je...@google.com> wrote:
> Hello,
>
>  Please seehttp://apiblog.youtube.com/2010/02/best-practices-for-avoiding-quota....
>
> Cheers,
> -Jeff Posnick, YouTube API Team
> groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
> @YouTubeDev
>
> On Feb 28, 11:46 am, UStriAthlete <jasoncros...@gmail.com> wrote:
>
> > getting
> >Fatalerror:Uncaughtexception'Zend_Gdata_App_HttpException' with
> >message'Expectedresponsecode200,got403
> >yt:quotatoo_many_recent_calls'
>
> > I was testing sunday and ran thiscodemuultiple times, but none since
> > then.  Any help would be appreciated.
>
> >codeis below
> > $username = $get_config->yt_username;
> > $password = $get_config->yt_password;
> > $developerKey = $get_config->yt_developerKey;
>
> > Zend_Loader::loadClass('Zend_Gdata_YouTube');
> > Zend_Loader::loadClass('Zend_Gdata_AuthSub');
> > Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
> > //$yt = new Zend_Gdata_YouTube();
>
> >  $authenticationURL= 'https://www.google.com/accounts/ClientLogin';
> >  $httpClient =   Zend_Gdata_ClientLogin::getHttpClient(
> > $username = $username,
> > $password = $password,
> > $service = 'youtube',
> > $client = null,
> > $source = 'MySource',
> >  // a short string identifying your application
> > $loginToken = null,
> > $loginCaptcha = null,
> > $authenticationURL);
>
> >  $developerKey = $developerKey;
> >  $applicationId = 'Video uploader v1';
> >  $clientId = '';
> >  $yt = new Zend_Gdata_YouTube($httpClient, $applicationId, $clientId,
> > $developerKey);
>
> > $newPlaylist = $yt->newPlaylistListEntry();
> > $newPlaylist->summary = $yt->newDescription()->setText('Triathlon
> > Workout Playlist');
> > $newPlaylist->title = $yt->newTitle()->setText($playlistName);
> > //$thePlaylistId = $yt->playlistId;
> > //echo "<br />the playlist id is $thePlaylistId <br />";
> > // post the new playlist
> > $postLocation = 'http://gdata.youtube.com/feeds/api/users/wearitliveit/
> > playlists';
> >         try {
> >         $yt->insertEntry($newPlaylist, $postLocation);
> >         echo"Playlist Created <br />";
> >         //$playlistUrl=$newPlaylist->getTitleValue();
> >         //echo"Playlist URL is $playlistUrl";
> >         }
> >         catch
> >         (Zend_Gdata_App_Exception $e)
> >         {
> >         echo $e->getMessage();
> >         }
>
> > $query = $yt->newVideoQuery();
>
> > $query->videoQuery = 'triathlon';
>
> > $query->startIndex = 10;
> > $query->maxResults = 20;
> > $query->orderBy = 'viewCount';
> > echo "<br />Query URL: " . $query->queryUrl . "\n<br />";
> > $videoFeed = $yt->getVideoFeed($query);
>
> > foreach ($videoFeed as $videoEntry) {
>
> >     $feed = $yt->getPlaylistListFeed('default');
>
> > foreach ($feed as $playlistListEntry) {
>
> > $postUrl = $playlistListEntry->getPlaylistVideoFeedUrl();
> > $videoEntryToAdd = $yt->getVideoEntry( $videoEntry->getVideoId() );
>
> > // create a new Zend_Gdata_PlaylistListEntry, passing in the underling
> > DOMElement of the VideoEntry
> > $newPlaylistListEntry = $yt->newPlaylistListEntry($videoEntryToAdd-
>
> > >getDOM());
>
> >                 // post
> >         try {
> >           $yt->insertEntry($newPlaylistListEntry, $postUrl);
> >                 } catch (Zend_App_Exception $e) {
> >                   echo $e->getMessage();
> >                 }
>
> > }// end foreach feed
>
> > $playlistListFeed = $yt->getPlaylistListFeed('wearitliveit');
>
> >      foreach ($playlistListFeed as $playlistEntry) {
>
> >          echo $playlistEntry->title->text . "\n<br />";
>
> >          echo $playlistEntry->description->text . "\n<br />";
>
> >         if ( $playlistEntry->title->text == "$playlistName" ) {
>
> >            $the_video_id = $playlistEntry->getPlaylistVideoFeedUrl();
>
> >             echo "$the_video_id</br />";
>
> >           $this->echoPlaylist($the_video_id);
>
> >                   }
>
> >       }

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment