How do I use the Zend Youtube API correctly?
I am trying to access the YouTube API with the Zend libraries that I have included like this (the full path to the Zend library is components/lib/Zend/Gdata.php):
//Include Zend Gdata set_include_path('components/lib'); include("Zend/Gdata.php");
I now try to use the framework thus:
//Access video data via Zend library $yt = new Zend_Gdata_YouTube();
However when running the script it returns:
开发者_如何转开发 Fatal error: Class 'Zend_Gdata_YouTube' not found in E:\inetpub\students\fit3060\20712510\ass2\results.php on line 48
I think I have not included the Zend library properly or declared the include path correctly?
Zend_GData doesn't directly include the YouTube component. You need to include it specifically or, better yet, use the Autoloader.
精彩评论