Uploading to youtube's specific channel?

fancyfanta

Junior Member
Joined
Oct 14, 2014
Messages
101
Reaction score
20
I'm trying to upload videos to Youtube. Successfully uploaded videos to account's channel. After that I created new channel with name "Deneme1". And I tried to upload to that channel with api; but uploaded to main.
public static string UploadVideo(string FilePath, string Title, string Description)
{
YouTubeRequestSettings settings;
YouTubeRequest request;
string devkey = "api key";
string username = "mail";
string password = "password";
settings = new YouTubeRequestSettings("Deneme1", devkey, username, password) { Timeout = 10000000 };
request = new YouTubeRequest(settings);

Video newVideo = new Video();
newVideo.Title = Title;
newVideo.Description = Description;
newVideo.Private = true;
newVideo.YouTubeEntry.Private = false;
newVideo.Keywords = "asd";
newVideo.Tags.Add(new MediaCategory("Sports", YouTubeNameTable.CategorySchema));
newVideo.YouTubeEntry.MediaSource = new MediaFileSource(FilePath, "video/flv");
Video createdVideo = request.Upload(newVideo);
return createdVideo.VideoId;
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
string videopath, videotitle, videodesc;
videopath = "filepath";
videotitle = "test title";
videodesc = "test description";
UploadVideo(videopath, videotitle, videodesc);
}
catch (Exception exception)
{
Response.Write("Upload failed: " + exception.Message);
}
 
I don't have very good knowledge about codding... but trying to start a YouTube Chanel is there any tip for me...?
 
Back
Top