Hi i want to create an uploading video program using youtube api I think I missed something. I search for some examples on how to upload using .net but cant seem to find an answer.
Heres my code:
` Imports Google.YouTube Imports Google.GData.Client Imports Google.GData.Extensions Imports Google.GData.Extensions.MediaRss Imports Google.GData.YouTube Imports Google.GData.Extensions.LocationPublic Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickDim settings As YouTubeRequestSettings Dim request As YouTubeRequest
settings = New YouTubeRequestSettings("youtube uploader", "AI39si4NwqS3ISLGVjlHBCdC8BfiJJSJWqqcJEvZOLbFohZAslQ4uhgrnFOJKdxGju55g2xoSImzEhXPGE5syMV9X0fh8NEHGg", txtuser.Text, txtpass.Text) request = New YouTubeRequest(settings)
Try Dim newVideo As Video = New Video() newVideo.Title = "Hangover Sample Movie" newVideo.Tags.Add(New MediaCategory("Sample", YouTubeNameTable.CategorySchema)) newVideo.Keywords = "hangover, funny" newVideo.Description = "Hangover" newVideo.YouTubeEntry.Private = False newVideo.Tags.Add(New MediaCategory("hangover, funny, comedy", 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(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\sample.avi", "video/avi") request.Upload(newVideo) Catch ex As Exception MsgBox(ex.Message) End Try End Sub End Class`
but it produces this error Execution of request failed https://uploads.gdata.youtube.com/feeds/api/users/default/uploads