9
下面的代码失败了吗?可能是什么问题?如何使用C#中的Youtube API将视频上传到YouYube?
YouTubeRequestSettings settings = new YouTubeRequestSettings("whatwill come here ?",
"my api key",
"my youtube login email", "my youtube login password");
YouTubeRequest request = new YouTubeRequest(settings);
Video newVideo = new Video();
newVideo.Title = "test 1";
newVideo.Tags.Add(new MediaCategory("Gaming", YouTubeNameTable.CategorySchema));
newVideo.Keywords = "test 1 , test 2";
newVideo.Description = "test 3 test 4";
newVideo.YouTubeEntry.Private = false;
newVideo.Tags.Add(new MediaCategory("tag 1, tag 2",
YouTubeNameTable.DeveloperTagSchema));
newVideo.YouTubeEntry.Location = new GeoRssWhere(37, -122);
newVideo.YouTubeEntry.MediaSource = new MediaFileSource("C:\\test.avi", "video/quicktime");
Video createdVideo = request.Upload(newVideo);
我解决了这个问题。这是我的分类:类别必须是游戏而不是游戏。
[YouTube API集成ASP.NET - 使用单个页面上传视频]的可能副本(http://stackoverflow.com/questions/629435/youtube-api-integration-asp-net-upload-video-with-一个单页) – 2011-01-21 21:51:17