开发者

Youtube video upload using asp.net

I want to upload video to Youtube from my开发者_如何学运维 ASP.NET application. It should return video ID or embed code after uploaded video.


Ah, google integration. Be ye warned: here lies madness.

http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html#Process_Flows_for_Uploading_Videos

An extremely high overview: You will either

  1. Need to perform integration with oauth to retrieve an authorization token, or
  2. Pass this user along to google to authorize them and then send you back a token which you must catch.

After authorization you may either:

  1. Send youtube an http post request containing the video upload as well as meta data, or
  2. Submit a form post that contains the a hidden input feild with their auth token.

Youtube then passes you back data that contains the id as well as other meta video data.

At this point you would need to perform additional http posts to their api in order to retrieve the embed code.

Youtube's api upload documentation lists between 6-13 steps depending on what choices you make in your app.

Hope this overview helps!

Edit

Here is another question on SO about this same thing. It includes code samples:

How can I upload a video to YouYube using the Youtube API in C#?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜