up690539 / gdata-samples

Automatically exported from code.google.com/p/gdata-samples
0 stars 0 forks source link

Youtube DirectUploading ASP.NET #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. index.aspx using google data api
2. retrieveing a video works fine
3. uploading causes Google.GData.Client.GDataRequestException: Execution of
request failed:
http://uploads.gdata.youtube.com/feeds/api/users/Moneoneseven/uploads
---> System.Net.WebException: The remote server returned an error: (400)
Bad Request.
deleting and updatinf causes Google.GData.Client.GDataRequestException: Can
not update a read-only entry

What is the expected output? What do you see instead?
upload/update/delete video

What version of the product are you using? On what operating system?
lastest API, ASP.NET 3.5, IIS 7

Please provide any additional information below.
i think there's something wrong with authentification (developerkey,
clientid, ...)
manual upload via youtube-website works fine.

Original issue reported on code.google.com by katha.sc...@gmail.com on 9 Jul 2009 at 10:07

GoogleCodeExporter commented 8 years ago
   string developerKey = "AI39si5jEvO_F4HUPbnRAz9WB-pV8Zqg0Jszguelg9B15dqu7SqK7IDkd3xirT9nRQuUoxPtmKjolrg6HhM_DbLDxOSe7lC8AA";
        string username = "vbvspl@gmail.com";
        string password = "@lt12345";
        YouTubeRequestSettings settings = new YouTubeRequestSettings("Videoapp", null, developerKey, username, password);
        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);
        // alternatively, you could just specify a descriptive string
        // newVideo.YouTubeEntry.setYouTubeExtension("location", "Mountain View, CA");

        newVideo.YouTubeEntry.MediaSource = new MediaFileSource("c:\\mnt_hood.avi", "video/x-msvideo");
        try
        {
            Video createdVideo = request.Upload(newVideo);
        }
        catch (Exception ex)
        {

        }

Original comment by vbv...@gmail.com on 26 Oct 2010 at 4:06

GoogleCodeExporter commented 8 years ago
sbobet2011@oal.com

Original comment by johnsbo...@gmail.com on 2 Feb 2011 at 1:41

Attachments:

GoogleCodeExporter commented 8 years ago
youtube

Original comment by akashkho...@yahoo.com on 20 Oct 2011 at 1:17