video or number of videos after uploading. Would like to be able to
turn off "rate", "comment", "commentVote", "videoRespond", "embed" and
"syndicate" but although I'm not getting any errors, the permissions
are not being changed. Having authenticated (which I know is working
since I can upload), this is the code I'm trying:
$videoFeed=$yt->getuserUploads('my username'); # all videos in our
Channel
$actions = array("rate", "comment", "commentVote", "videoRespond",
"embed", "syndicate");
foreach ($videoFeed as $videoEntry) {
foreach($actions as $action) {
echo "<li> setting '".$action."' for video ".$videoEntry-
>getVideoId()."</li>\n";
$accessControlElement = new
Zend_Gdata_App_Extension_Element('yt:accessControl', 'yt', 'http://
gdata.youtube.com/schemas/2007', '');
$accessControlElement->extensionAttributes = array(
array(
'namespaceUri' => '',
'name' => 'action',
'value' => '$action'),
array('namespaceUri' => '',
'name' => 'permission',
'value' => 'denied')
);
$videoEntry->extensionElements = array($accessControlElement); #
apply the setting to this video
}
}
PHP is 5.3.0, Zend is version 1.11.4 Release (r23791). Any ideas?
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment