1

PHPでAPIを使用してYouTubeのビデオコメントに返信を追加するには?

4

2 に答える 2

1

1分間検索して、これを見つけました: https://developers.google.com/youtube/2.0/developers_guide_protocol_comments#Adding_a_comment

あなたが必要とするもののように見えます。もちろん、コメントを投稿したいユーザーを認証する必要があります。

POSTPHP でリクエストを作成する方法については、次の記事を参照してください: http://www.lornajane.net/posts/2010/three-ways-to-make-a-post-request-from-php

于 2012-06-06T13:27:44.063 に答える
0

このライブラリにより、返信コメントを簡単に追加できるようです: https://github.com/jimdoescode/Zendless-PHP-YouTube-API

/**
 * Add a comment to a video or a reply to another comment.
 * To reply to a comment you must specify the commentId
 * otherwise it is just a regular comment.
 *
 * @param string $videoId the video the comment goes with.
 * @param string $comment the comment
 * @param string (optional) $commentId the id of the comment to reply to.
 * @return mixed false if not authenticated otherwise the http response is returned.
 **/

 public function addComment($videoId, $comment, $commentId = false)
于 2012-07-25T00:29:08.847 に答える