KnowlegeZone.com, Share knowledge Gain knowledge
New Articles:
     

Home > ASP : Getting comments from youtube using c#

Question By: Charlene   Date: 4/21/2010

Getting comments from youtube using c#

Hi,

 

I'm trying to get comments from youtube using c#.

I have no idea how to do this.

I have done this so far:

Uri videoEntryUrl = new Uri(s);

YouTubeRequestSettings settings = new YouTubeRequestSettings("", "", key);
YouTubeRequest req = new YouTubeRequest(settings);

Video video = req.Retrieve<Video>(videoEntryUrl);

 

But its giving me an exception at the last line.

 

Can anyone help me please?

 

Thnx

 



Share |


Comments.
Comment/Solution Posted By: skhan    Date: 4/21/2010 1:04:00 PM
whats the value of variable "s"?

Uri videoEntryUrl = new Uri(s);


Comment/Solution Posted By: Charlene    Date: 4/21/2010 1:07:00 PM
String s = "http://gdata.youtube.com/feeds/videos/mAk1MX3ES_g";

its giving me this exception:

GDataRequestException was unhandled

Thanks!

Comment/Solution Posted By: skhan    Date: 4/21/2010 2:06:00 PM
did you follow this tutorial?

http://www.knowlegezone.com/documents/79/Youtube-API-using-C-VBNET/

did you copy YouTube Sample Library code into app_code directory?

Comment/Solution Posted By: Charlene    Date: 4/21/2010 2:20:00 PM
Oh my.

Thank you so so much!
I needed an extra "api" in my URI string

Thank youuu!

Comment/Solution Posted By: skhan    Date: 4/21/2010 2:23:00 PM
No Problem Charlene:)

Comment/Solution Posted By: skhan    Date: 5/2/2010 12:07:00 PM
just so you guyus know. an easier and better version of this tutorial is available here:

http://www.knowlegezone.com/documents/135/YouTube-REST-API-Tutorial/


Pages :
Post Comment or Solution   OR   Sign in using Google/Aol/Yahoo/Msn/OpenID
Your Name:  
Your Email:  
Comments:
 
Please Verify:
(Type Answer)