【发布时间】:2011-06-13 10:40:09
【问题描述】:
下面的代码失败了?可能是什么问题?
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);
我解决了这个问题。这是我的类别:类别必须是 Games 而不是 Gaming。
【问题讨论】:
-
我看到了。但它没有解释如何使用 youtube api。我如何整合它?我下载并安装了 YouTube SDK (1.7.0.1).msi
-
嗨 MonsterMMORPG 我有关于在 YouTube 上上传视频的教程或代码吗?我被 Client_secret.json 文件卡住了。您的指导将不胜感激...请帮助我...
标签: c# video upload youtube youtube-api