In case you have missed our recent blog entry (http://
apiblog.youtube.com/2009/02/youtube-api-outgrows-shy-
adolescence.html), YouTube has recently pushed out new activity feeds
that allow you to see what you and your friends have been up to on
YouTube.com.
If you are using PHP, you may be interested in the demo application
(http://www.googlecodesamples.com/youtube/php/YouTubeActivityViewer/)
that Jeff Fisher and I wrote. It uses a small PHP backend, which can
optionally be used with Memcache (http://us.php.net/memcache) to
temporarily store activity events.
It uses two new classes available in Zend Framework 1.7.5,
Zend_Gdata_YouTube_ActivityFeed (http://framework.zend.com/apidoc/core/
Zend_Gdata/YouTube/Zend_Gdata_YouTube_ActivityFeed.html) and
Zend_Gdata_YouTube_ActivityEntry (http://framework.zend.com/apidoc/
core/Zend_Gdata/YouTube/Zend_Gdata_YouTube_ActivityEntry.html).
To get user activity using the PHP client library, simply use the new
"getActivityForUser('foo')" method on the Zend_Gdata_YouTube object.
Activity for up to 20 users can be retrieved at a time. Friend
activity can be retrieved with the "getFriendActivityForCurrentUser()"
method.
The full source code is available here:
http://code.google.com/p/gdata-samples/source/browse/branches/ytaview...
For more information, please check out the documentation:
http://code.google.com/apis/youtube/2.0/developers_guide_php.html#Act...
Note that support has also been added in the .NET and Java client
libraries.
Cheers,
- Jochen