Friday, March 2, 2012

[YouTube-API] GetUploadToken request failed

questions in comments...
class TestPage...Upload_Click...
...g object values are preloaded from db

YouTubeRequestSettings settings = new
YouTubeRequestSettings("IsThisWhaterIType?", g.DevKey, g.User, g.PW);

//Does Application name need to validate againse something in dev or
users acct?

YouTubeRequest request = new YouTubeRequest(settings);
Video newVideo = new Video();
newVideo.Title = "My Test Movie";
newVideo.Tags.Add(new MediaCategory("Finance",
YouTubeNameTable.CategorySchema));
newVideo.Keywords = "TBD, WillitNotPost";
//same thing do keywords need to validate againse something maste
youtube lis?
newVideo.Description = "Test Description";
newVideo.YouTubeEntry.Private = false;

//these are optional right?
newVideo.Tags.Add(new MediaCategory("form4,
KB"+ArticleID.ToString(),
YouTubeNameTable.DeveloperTagSchema));
newVideo.YouTubeEntry.setYouTubeExtension("location", "New
Mexico");

try
{
FormUploadToken token =
request.CreateFormUploadToken(newVideo);
HiddenUrl.Value = token.Url;
HiddenToken.Value = token.Token;
}
catch (Exception ex)
{
HandleError("Error fetching YouTube Upload Token: " +
ex.Message);

if( ex.Message == "Execution of request failed:
https://gdata.youtube.com/action/GetUploadToken" )
{
if( dev.bHasNoIdeaWhatToDo )
{
YouTube_APIs_Developer_Forum.AskForHelp(this);
//Seriously though what am I doing wrong?


}
}

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment