protected void btnsubmit_Click(object sender, EventArgs e)
{
YouTubeModel youtubeModel;
YouTubeRequestSettings settings;
YouTubeRequest request;
string devkey = "AIzaSyBzFdJApkJnjh6LCGpY-IIAku3dsjE5T3A";
string filename = Path.GetFileName(fileupload.FileName);
fileupload.SaveAs(Server.MapPath("~/App_Data") + filename);
string path = Server.MapPath("~/App_Data") + filename;
string filepath = Path.GetFullPath(path);
settings = new YouTubeRequestSettings("youtube", "535208901500 - 4f57lvr1vnequ7f3dqalug3eejj351c0.apps.googleusercontent.com", devkey);
request = new YouTubeRequest(settings);
settings.Timeout = 1000000000;
Video video = new Video();
video.Title = "Sample Video Title";
video.Description = "Sample Video Description";
video.Tags.Add(new MediaCategory("Comedy", YouTubeNameTable.CategorySchema));
video.Keywords = "Comedy";
video.Private =false;
video.MediaSource = new MediaFileSource(filepath, "video/quicktime");
Video createdVideo = request.Upload(video);
}
i have used namespaces like thatusing Google.GData.Extensions;
using Google.GData.Client;
using Google.GData.YouTube;
using Google.GData.Extensions.MediaRss;
using Google.YouTube;
i already installed google Api v3 and i already generated ClientId key and Developer key
what is the problem??i have already searched in google but unable to get proper solution..what should i do for solving this problem??can anyone help me please???