2013-06-24 57 views
1

这是我使用从我的应用程序上传视频代码:有关YouTube认证上传视频

Dim setting As New YouTubeRequestSettings("my app name ", "my developer key, username,   password ") 
Dim request As New YouTubeRequest(setting) 

Dim newVideo As 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"); 

    ' Dim token As FormUploadToken = Request.CreateFormUploadToken(newVideo) 
    Dim token As FormUploadToken = Request.CreateFormUploadToken(newVideo) 
    Console.WriteLine(token.Url) 
    Console.WriteLine(token.Token) 

现在,这里有我的应用程序名称,开发者密钥,我收到凭证无效的错误。

只是想知道什么应该给这个用户名和密码,我上传我的网站,一个网站项目的视频。

回答

0

当使用ClientLogin(您正在使用的)时,用户名应该是与YouTube频道相关联的Google帐户的电子邮件地址,密码应该是与该Google帐户关联的标准密码。