CodeIgniter Forums

Full Version: GData and Codeignitor problem with class/methods for YouTube
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hi folks, brain is fried and I don't seem to be able to figure this out. Any help welcome.

I am trying to get a list of youtube playlists for a username and their associated videos, from which users can select the playlist and then play the videos.

I have seen which uses simpleXML but it did not work for me.

So I decide to look a merging gData with CI. ( The additional advantage is that I have Zend library available.

This listing was a great help

I am now at the stage of trying to mix the google api documentation examples with my work but it keeps failing because it thinks one of the Zend/YouTube methods is not a method.

I have moved this function into a model.

function getAndPrintPlaylistListFeed($userName, $showPlaylistContents){
        $yt = new Zend_Gdata_YouTube();  
        // optionally set version to 2 to retrieve a version 2 feed  
        $playlistListFeed = $yt->getPlaylistListFeed($userName);  
        printPlaylistListFeed($playlistListFeed, $showPlaylistContents);
When it is called it fails because printPlaylistListFeed() is not recognised as a method of the GData/YouTube class.

e.g.Fatal error: Call to undefined function printplaylistlistfeed()

It has been a long day and if it is really simeple then DOH, but any help appreciated