To jest mój kod:Chcę usunąć film z moim kanale na YouTube przy użyciu API
YouTubeService serv = new YouTubeService("myDeleteService", YOUTUBE_DEVELOPER_KEY);
serv.setUserCredentials(USERNAME, PASSWORD);
YouTubeRequestSettings settings = new YouTubeRequestSettings(YOUTUBE_CHANNEL, YOUTUBE_DEVELOPER_KEY);
YouTubeRequest request = new YouTubeRequest(settings);
string feedUrl = String.Format("http://gdata.youtube.com/feeds/api/users/{0}/uploads", YOUTUBE_CHANNEL);
Feed<Video> videoFeed = request.Get<Video>(new Uri(feedUrl));
Uri videoEntryUrl = new Uri("http://gdata.youtube.com/feeds/api/videos/" + VideoId);
Video video = request.Retrieve<Video>(videoEntryUrl);
Video vid = (from vi in videoFeed.Entries
where vi.VideoId == VideoId
select vi).First<Google.YouTube.Video>();
request.Delete(vid);
Przerwy kod na ostatniej linii stwierdzające, że odwołanie do obiektu nie jest ustawiona na obiekcie.
Jakieś rozwiązanie? Napotkałem ten sam problem. –
Otrzymałem również ten błąd. Twoje rozwiązanie naprawdę mi pomoże. +1 za pomoc – Sukhjeevan