Skip Navigation LinksHome > Categories > Code from a Category

Get YouTube vidoe links using API - Asp.net C#



User Name: jamest85
Name: James T
Contact Me: www.datawebcoder.com/ContactUs.aspx
Home Page: www.datawebcoder.com
Certified Zoho CRM Consultant. 4 years experience on Zoho consulting, implementation, and programming using C#, VB, Php..., 9 years of total IT experience including programming and application develop... [More]
Viewed Times: 1497
Add Date: 03/19/2010
This post shows how to get Youtube video links programmatically based on the Youtube user name by using Youtube API.
If we want to play Youtube videos on our website, we don't need download the video files and upload them to our server, all we need is the Youtube video link URL, such as: http://www.youtube.com/watch?v=b4Jd6bEg-12, this post is showing you how to do that.

What if we want to continuously update our site videos with most recent Youtube videos? it is not practical that we ask the Youtube users to inform us especially if there are many users with many videos, that means we need find a way that can search the Youtube videos by the Youtube user name and see if there is any new videos, if it is, we need get the video links and save to our database.

Below is the interface we want to use that can show a list of new Youtube videos which doesn't exist in my website yet.



Step 1: Get a developer key from here

Step 2: Download the .msi files from google-gdata page
.
We need some dll files to communicate with Youtube server.

Step 3: Add 3 reference files


Step 4: Here are the 3 dll files in your Bin folder:


Step 5: Add these in your .cs file (App_Code folder). Step 6: Here is the code

That's it, you can get more information on how to get data from Youtube videos, please visit here
Naresh
Comment #:  58 Replay this Comment Reply this comment Posted on: 5/7/2012

I am new to .net coding, can i have complete code

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
 
    
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.