Visual Basic 2012的新YouTube API示例

时间:2013-02-08 19:09:36

标签: youtube-api

需要一些帮助,因为API比那里的样本更新。

这是我的代码:

Imports Google.GData.Client
Imports Google.GData.Extensions
Imports Google.GData.Client.RequestSettings
Imports Google.GData.YouTube
Imports System.Net

Public Class Form1

Private Sub btnLogin_Click(sender As Object, e As EventArgs) Handles btnLogin.Click
    Dim settings As RequestSettings
    Dim request As Google.YouTube.YouTubeRequest

    settings = New Google.YouTube.YouTubeRequestSettings("YouTube List", "DEVKEY", ytUserName.Text, ytPassword.Text)
    request = New Google.YouTube.YouTubeRequest(settings)
    settings.AutoPaging = True

    Dim youtuberequest As New Google.YouTube.YouTubeRequest(settings)

    For y As Integer = 0 To youtuberequest.GetVideoFeed("PBXHowTos").Entries.Count - 1
        ListBox1.Items.Add(youtuberequest.GetVideoFeed("PBXHowTos").Entries(y).Id)
    Next
End Sub
End Class

我的问题是这个功能不起作用。有没有人有新的YouTube for Adob​​e API的实例?

1 个答案:

答案 0 :(得分:0)

看起来您正在使用API​​的V2。你试过V3.0吗?以下是示例的链接:http://code.google.com/p/youtube-api-samples/source/browse/samples/dotnet/search.cs,要下载.Net的客户端库,请点击以下链接:http://code.google.com/p/google-api-dotnet-client/