I’m unable to find any documentation where I can find a code example for receiving the likes and dislikes of a video.
That’s my current code:
$videoId = 'AyJl2NyQ0hI';
$videoEntry = $yt->getVideoEntry($videoId);
echo "Views: <strong>".$videoEntry->getVideoViewCount()."</strong><br />";
It works fine, but who to get the likes/dislikes?
Thanks.
Just look through the source for classes
Zend_Gdata_YouTube_VideoEntryandZend_Gdata_YouTube_Extension_Statistics:Edit: You edited your question and you are now looking for Likes/Dislikes
Step 1: Change the protocol version to v2
Step 2: The last stable release of the zend gdata youtube client is missing methods to access the likes and dislikes, but the data is returned. You can get at it by looking through the extension attributes of the Rating extension:
Which should return: