views:

138

answers:

1

I'm trying to set up a quick PHP demo using the Youtube API that adds a video (using its ID) to a pre-created playlist (using its ID as well). The documentation for the PHP API doesn't specify how to do this. I'm referring to this documentation: http://code.google.com/apis/youtube/2.0/developers_guide_php.html#Adding_a_Playlist_Video

Does anyone know how to accomplish this using the PHP API? It seems like it should be ridiculously simple, but I'm not seeing it.

+1  A: 

Look through the code for the project located here: http://www.myphpetc.com/2009/12/building-youtube-playlist-queue-with.html

Oren
Thank you for the quick answer. I found that it is not possible to insert to a playlist that doesn't belong to the authenticated user, but the linked project has a function that will insert a video into a playlist. You can use client authentication to accomplish this and thus collect videos to your own playlist programatically.
nathanb
Did you actually get this to work? Adding a video to a playlist (that I have account details for) programatically? I seem to get errors all the time.. (See http://stackoverflow.com/questions/2848016/how-to-add-an-existing-video-to-an-existing-youtube-playlist)If you did, could I be really cheeky and ask for a snippet of code? Many thanks
JohnnyJP