1
class Program
{
    static void Main(string[] args)
    {
        string Appname;
        string developerKey;
        string username;
        string password;

        Appname = "a";
        developerKey = "b";
        username = "c";
        password = "d";

        YouTubeRequestSettings settings = new
           YouTubeRequestSettings(Appname, developerKey, username, password);
        YouTubeRequest request = new YouTubeRequest(settings);

        Uri videoEntryUrl = new
            Uri("http://www.youtube.com/watch?v=dOShGP0FM1U");
        Video video = request.Retrieve<Video>(videoEntryUrl);

        Comment MyComment = new Comment();
        MyComment.Content = "random tango";
        if (video != null)
        {
            request.AddComment(video, MyComment);
        }
        else
        {
            Console.Write("Video was null for some reason!");
            Console.ReadKey();
        }
    }
}

何らかの理由でビデオが null を返し続け、私は理解できません。このプロジェクトで本当に助けが必要なすべてを試しました。

4

0 に答える 0