Hi,
I am using 1.45 gdata java library.
In the last couple of days I am getting the following error when we
try to remove a video from a playlist.
com.google.gdata.util.ServiceForbiddenException: Not an owner of the
playlist.
<errors xmlns='
http://schemas.google.com/g/2005'><error><domain>GData</
domain><code>ServiceForbiddenException</code><internalReason>Not an
owner of the playlist.</internalReason></error></errors>
The code which does this:
// fetch all videos in the playlist, iterate and delete from playlist
String youtubePlaylistId = "the-playlist-id";
String feedUrl = "
http://gdata.youtube.com/feeds/api/playlists/" +
youtubePlaylistId;
YouTubeQuery q = new YouTubeQuery(new URL(feedUrl));
PlaylistFeed playListFeed = service.getFeed(q, PlaylistFeed.class);
if (playListFeed != null) {
List<PlaylistEntry> entries = playListFeed.getEntries();
for (PlaylistEntry entry : entries) {
String id = entry.getMediaGroup().getVideoId();
if (id.compareTo(videoId) == 0) {
entry.delete(); // error is thrown here
}
}
}
The same code was working fine before. Has anything changed in the
APIs causing this?
Thanks
Sunny