如何在不使用asp.net的api的情况下将视频上传到Youtube? 我的要求是用户将视频上传到我们的网站,并在管理员批准后将视频上传到Youtube。我正在使用ASP.NET
答案 0 :(得分:2)
验证码可以在同一页面上找到。 http://code.google.com/apis/youtube/2.0/developers_guide_dotnet.html#Authentication
答案 1 :(得分:0)
杰森我正在使用这段代码:
Dim request As YouTubeRequest
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)
newVideo.YouTubeEntry.MediaSource = New MediaFileSource("c:\\flame.avi", "video/quicktime")
Dim createdVideo As Video = request.Upload(newVideo)
但是在哪里指定Youtube凭证和密钥?
答案 2 :(得分:0)
Dim settings As YouTubeRequestSettings = New YouTubeRequestSettings("youtube", developerKey, username, password)
Dim request As New YouTubeRequest(settings)
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)
newVideo.YouTubeEntry.MediaSource = New MediaFileSource("c:\\drop.avi", "video/x-msvideo")
Dim createdVideo As Video = request.Upload(newVideo)