Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

C# Adding Comments with YouTube V3 API not working

$
0
0

I am using C# and using the YouTube V3 API. I am trying to insert a comment into a video, however it not working although it no error. Anyone can help me, thanks! My code:

UserCredential credential;using (var stream = new FileStream("XacThuc\\" + jsonup, FileMode.Open, FileAccess.Read)){    credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(        GoogleClientSecrets.Load(stream).Secrets, new[] { YouTubeService.Scope.YoutubeForceSsl },"user", CancellationToken.None, new FileDataStore(this.GetType().ToString())        );}var youtubeService = new YouTubeService(new BaseClientService.Initializer(){    HttpClientInitializer = credential,    ApplicationName = this.GetType().ToString()});CommentThreadSnippet commentThreadSnippet = new CommentThreadSnippet();commentThreadSnippet.VideoId = dtseReUp.Rows[i]["downloadid"] +"";commentThreadSnippet.TopLevelComment = new Google.Apis.YouTube.v3.Data.Comment() { Snippet = new CommentSnippet() { TextOriginal = mota_edit } };CommentThreadsResource.InsertRequest commentReq = youtubeService.CommentThreads.Insert(new CommentThread() { Snippet = commentThreadSnippet }, "snippet");CommentThread tr = commentReq.Execute();

anyone can help me Adding Comments with YouTube V3 API


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>