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

How to insert a comment pinned to the top

$
0
0

I'm using the youtube API to insert videos and in the end insert a comment. It's all working, though, I'd like to leave the pinned comment at the top. How could I do this?

My current code is like this:

$commentSnippet = new Google_Service_YouTube_CommentSnippet();$commentSnippet->setTextOriginal('My Commment');$topLevelComment = new Google_Service_YouTube_Comment();$topLevelComment->setSnippet($commentSnippet);$commentThreadSnippet = new Google_Service_YouTube_CommentThreadSnippet();$commentThreadSnippet->setTopLevelComment($topLevelComment);$commentThread = new Google_Service_YouTube_CommentThread();$commentThread->setSnippet($commentThreadSnippet);$commentThreadSnippet->setVideoId($videoId);$videoCommentInsertResponse = $youtube->commentThreads->insert('snippet', $commentThread);

Viewing all articles
Browse latest Browse all 3831

Trending Articles