Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I want to Upload a video file from my 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

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:

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",

        newVideo.YouTubeEntry.Location = new GeoRssWhere(37, -122);
        // alternatively, you could just specify a descriptive string
        // newVideo.YouTubeEntry.setYouTubeExtension("location", "Mountain View, CA");

        newVideo.YouTubeEntry.MediaSource = new MediaFileSource(strpath,
            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..

Updated 15-Sep-10 3:28am
Dalek Dave 15-Sep-10 9:28am    
Edited for Code Block.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900