Friday, May 4, 2012

[YouTube-API] Re: upload vedio to youtube throw .net

Hello,

You might be running into quota issues:

http://apiblog.youtube.com/2010/02/best-practices-for-avoiding-quota.html

Or you might be running into another error. You could examine the
exception in the .NET debugger—one of its properties should give an
exact error message that was returned from the API, but I forget which
off the top of my head.

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev


On May 1, 3:40 pm, Mahmoud Abo Elnaga <m.neos...@gmail.com> wrote:
> while trying to upload vedio to youtube i got "The remote server returned
> an error: (403) Forbidden."
>
> please review below my code:
>
> YouTubeRequestSettings settings =
>                       new YouTubeRequestSettings(ProjectName, DevKey
>                           , GmailEmail, Pwd);
>
>             YouTubeRequest request = new YouTubeRequest(settings);
>             Video newVideo = new Video();
>             newVideo.Title = "My Test Movie";
>             newVideo.Tags.Add(new MediaCategory("Autos",
> YouTubeNameTable.CategorySchema));
>
>             newVideo.Keywords = "cars, funny";
>             newVideo.Description = "My description";
>             newVideo.YouTubeEntry.Private = false;
>             newVideo.Tags.Add(new MediaCategory("mydevtag, anotherdevtag",
>             YouTubeNameTable.DeveloperTagSchema));
>             //newVideo.YouTubeEntry.Location = new GeoRssWhere(37, -122);
> // alternatively, you could just specify a descriptive string             //newVideo.YouTubeEntry.setYouTubeExtension("location", "Mountain View, CA");
>             newVideo.YouTubeEntry.MediaSource = newMediaFileSource(flUpload.FileContent, flUpload.FileName, GetFileMime(
> "avi"));
>
> Please Help

--
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