【发布时间】:2010-08-18 15:59:01
【问题描述】:
是否有任何 YouTube php 包装器可用于通过其 id 检索视频的评级?
【问题讨论】:
-
(教程) Use the YouTube API with PHP, 2008
是否有任何 YouTube php 包装器可用于通过其 id 检索视频的评级?
【问题讨论】:
使用 Zend/Google 的 PHP 库。来自 Zend 的 Zend_Gdata_YouTube 文档:
<?php
$yt = new Zend_Gdata_YouTube($httpClient,
$applicationId,
$clientId,
$developerKey);
?>
来自(也许有更好的记录)Google site:
<?php
$videoEntry = $yt->getVideoEntry('the0KZLEacs');
echo 'Rating: ' . $videoEntry->getVideoRatingInfo() . "\n";
?>
【讨论】:
以下是 YouTube 提供的示例代码: youtube/api-samples
【讨论】: