If you are using PHP for Youtube API then you may face problem of getVideoRatingInfo() returning array
Problem
echo "Rating: ".$videoEntry->getVideoRatingInfo();
output: Array
Solution
$a = array();
$a = $videoEntry->getVideoRatingInfo();
echo "Rating: " . $a['average'] . "\n";
output:3.5 (example)
Problem
echo "Rating: ".$videoEntry->getVideoRatingInfo();
output: Array
Solution
$a = array();
$a = $videoEntry->getVideoRatingInfo();
echo "Rating: " . $a['average'] . "\n";
output:3.5 (example)
No comments:
Post a Comment