Sunday, January 2, 2011

Re: Youtube API

I decided to give a try on youtube api today but I did things differently

I put all zend files in libs directory, added this line in my core.php file ...

set_include_path(get_include_path() . PATH_SEPARATOR . APP.'libs');

... and wherever I want to work with the api I just do a normal require for the zend loader class
       
require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path
Zend_Loader::loadClass('Zend_Gdata_YouTube');
$yt = new Zend_Gdata_YouTube();

I've only tested this approach on my local server, Hopefully it won't slow down the application in a production environment.
Has anybody else worked with any google api on cakephp? How would you set it up?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: