Hello All,
I want to Upload a video file from my Asp.net(c#) application to Youtube With its GoogleData Api for that i have created account in youtube also and also got the developer key for that application
I'd like to upload video and then save its URL so that I can view it later on.
from this article
http://code.google.com/apis/youtube/2.0/developers_guide_dotnet.html#Direct_Upload
Articles i come to know about two types of uploading so i have used direct uploading in my application.
now when i run that code in my application it gives me following error:
Execution of request failed: http://uploads.gdata.youtube.com/feeds/api/users/Youtube/uploads
My code is:
YouTubeRequestSettings settings =
new YouTubeRequestSettings("ApplicationName", "Developer key");
YouTubeRequest request = new YouTubeRequest(settings);
Video newVideo = new Video();
newVideo.Title = "My Test Movie";
newVideo.Tags.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema));
newVideo.Keywords = "cars, funny";
newVideo.Description = "My description";
newVideo.YouTubeEntry.Private = false;
newVideo.Tags.Add(new MediaCategory("mydevtag, anotherdevtag",
YouTubeNameTable.DeveloperTagSchema));
newVideo.YouTubeEntry.Location = new GeoRssWhere(37, -122);
newVideo.YouTubeEntry.MediaSource = new MediaFileSource(strpath,
"video/quicktime");
Video createdVideo = request.Upload("ApplicationName",newVideo);
Please provide me the exact code or any parameters or any steps to complete this
Any help would be appreciated..
Thanks,
Msheth