Hi,
I am have small doubt in working with youtube APIs.
this is the code i used for displaying the videos
string url = "http://gdata.youtube.com/feeds/videos?q=" + this.txtSearch.Text;
AtomFeed myFeed = GetFeed(url, 1, 15);
DisplayFeed(myFeed);
private string RenderVideoEmbedded(string id)
{
return string.Format("<div id=\"video{0}\"><object width=\"425\" height=\"355\"><param name=\"movie\" value=\"http://www.youtube.com/v/{0}&rel=1\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/{0}&rel=1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"355\"></embed></object></div>", id);
}
/// <summary>
/// Converts URL ID to short one
/// </summary>
/// <param name="googleID"></param>
/// <returns></returns>
private string getIDSimple(string googleID) {
int lastSlash=googleID.LastIndexOf("/");
return googleID.Substring(lastSlash + 1);
}
/// <summary>
/// Renders feed in example aspx page
/// </summary>
/// <param name="myFeed"></param>
private void DisplayFeed(AtomFeed myFeed)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
foreach (AtomEntry entry in myFeed.Entries)
{
#region render each
sb.Append("<br /><b>Title:</b> ");
sb.Append(entry.Title.Text);
sb.Append("<br /><b>Categories:</b> ");
foreach (AtomCategory cat in entry.Categories)
{
sb.Append(cat.Term);
sb.Append(",");
}
sb.Append(RenderVideoEmbedded(getIDSimple(entry.Id.AbsoluteUri)));
sb.Append("<br /><b>Published on:</b> ");
sb.Append(entry.Published);
#endregion
}
this.lblResults.Text = sb.ToString();
}
Now I want to get the contact list of the youtube users
http://code.google.com/apis/youtube/developers_guide_dotnet.html#AuthClientLogin
I tried with code, I am geeting some errors. Can any one please tell How to get the contacts of the youtube users.