private void ytAuthenticate() { myService = new YouTubeService("APPNAME", "DEVKEY"); myService.setUserCredentials("MyGmail", "PASS"); } protected void Button1_Click(object sender, EventArgs e) { ytAuthenticate(); YouTubeEntry YoutubeObject = new YouTubeEntry(); YoutubeObject.Media = new Google.GData.YouTube.MediaGroup(); YoutubeObject.Media.Title = new MediaTitle("My Test Movie"); YoutubeObject.Media.Categories.Add(new MediaCategory("Sports", YouTubeNameTable.CategorySchema)); YoutubeObject.Media.Keywords = new MediaKeywords("cars, funny"); YoutubeObject.Media.Description = new MediaDescription("My description"); YoutubeObject.Private = false; FormUploadToken token = myService.FormUpload(YoutubeObject); Session["form_upload_url"] = token.Url; Session["form_upload_token"] = token.Token; Response.Redirect("uploader.aspx"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)