Showing posts with label youtube api. Show all posts
Showing posts with label youtube api. Show all posts

Thursday, August 12, 2010

How to get a editable video entry - youtube api

I'm playing with the youtube api these days, this is another tip I think which will save you some time.

The usual getVideoEntry method will not return you a editable video entries. you must pass some extra parameters like this (3rd parameter tell to get full metadata)

$videoEntry = $yt->getVideoEntry($id, null, true);

or you can use

$entry = $yt->getFullVideoEntry($id);

Tuesday, August 10, 2010

Fatal error: Class 'Zend_Uri_Http' ZendGdata (YouTube API)

I followed the YouTube API - Developer's Guide: PHP, yet I got this error running their code, don't know why they are not updating the guide.

Fatal error: Class 'Zend_Uri_Http' not found in /home/path/public_html/ZendGdata/library/Zend/Gdata/App.php

As the error show us the fix is really simple, just load the Class 'Zend_Uri_Http'

require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_YouTube');
$yt = new Zend_Gdata_YouTube();

Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Uri_Http');

2010/08/14 Note: you have to load this class in your page where you call the YouTube API service (not in any zend php client library files.)

Freelance Jobs