TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
John Debono
NA
10
9.6k
Youtube API Posting Comment
May 15 2013 1:15 PM
Hello,
I am try to post a comment on youtube through the use of their api system. So far I have tried the below code but it doesn't seem to work.
This code is global.
YouTubeRequestSettings settings;
YouTubeRequest request;
YouTubeService youtube;
This code is found in the form load event of the application. I am using this code to connect with youtube's api.
youtube = new YouTubeService("example app");
youtube.setUserCredentials("YoutubeUsername", "YoutubePassword");
try
{
string strAuth = youtube.QueryClientLoginToken();
}
catch (Exception ex)
{
}
settings = new YouTubeRequestSettings("example app", "DeveloperKey", "YoutubeUsername", "YoutubePassword");
request = new YouTubeRequest(settings);
To post the comment, I created a button event with the following code.
Comment c = new Comment();
c.Content = "Comment";
Video v = new Video();
c.Content = "http://www.youtube.com/watch?v=wYjuMxAKe2U";
request.AddComment(v, c);
For some reason, when I click the button, the comment is not posting on the video.
Thanks.
Reply
Answers (
0
)
Delete a data in C#
c# windows application form (battleship game)