Ciao a tutti
devo aggiornare dei video presenti su youtube da un pannello di controllo che sto realizzando in asp.net 4.0
Ho fatto così:
YouTubeRequest request = new YouTubeRequest(settings);
Video newVideo = getVideo(video.VideoId);
newVideo.Title = video.Title;
newVideo.Tags.Add(new MediaCategory(video.Category, YouTubeNameTable.CategorySchema));
newVideo.Keywords = video.Keywords;
newVideo.Description = video.Description;
newVideo.YouTubeEntry.Private = true;
newVideo.YouTubeEntry.setYouTubeExtension("location", "Roma, RM");
request.Update(newVideo);
dove
public static Video getVideo(string videoId)
{
YouTubeRequest request = new YouTubeRequest(settings);
Uri videoEntryUrl = new Uri(URI_SINGLE_VIDEO + videoId);
return request.Retrieve<Video>(videoEntryUrl);
}
ma quando eseguo request.Update(newVideo) ricevo questo errore:
Execution of request failed: http://gdata.youtube.com/feeds/api/users/WebSymbiotic/uploads/z5G6L-rHaqE
"Errore del server remoto: (400) Richiesta non valida."
Ho notato che newVideo.Status è null. Non dovrebbe avere un valore diverso da null?
Dove sbaglio nell'aggiornamento?
Grazie mille