Wednesday, September 28, 2011

[YouTube-API] Re: Adding a video to a playlist typo and error

Hello,

I'm not sure which documentation you're referring to. Could you
provide the URL?

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev


On Sep 27, 2:32 pm, "ad...@playlisthq.com" <ad...@playlisthq.com>
wrote:
> The last line should be:
>
> request.AddToPlaylist(p, pm);
>
> However, even when I do use the above line, the video is not added.
>
> Adding a video to a playlist
>
> You can add a video to a playlist by using a PlayListMember object. The
> following code creates a PlayListMember object with a known ID value and
> then adds it to the Playlist object (p). Since the request does not specify
> a position where the video will appear in the playlist, the new video is
> added to the end of the playlist.
>
> // For Playlist object p
> PlayListMember pm = new PlayListMember();
>
> // Insert <id> or <videoid> for video here
> pm.Id = VIDEOID;
> request.AddToPlaylist(p, m);

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment