views:

794

answers:

0

Hi all, I was wondering if anyone could provide a code example for creating an album? The feature is not implemented in the example code and I am having trouble implementing it. Here is the code that I have so far.

GDataServiceGooglePhotos* service =
[[GDataServiceGooglePhotos alloc] init];

[service setUserCredentialsWithUsername:@"myusername"

password:@"mypassword"];
   NSURL* feedURL = [GDataServiceGooglePhotos
photoFeedURLForUserID:@"myusername"

albumID:nil albumName:nil photoID:nil kind:nil

access:kGDataPhotoAccessAll];

   GDataServiceGooglePhotos* ticket = [service
fetchPhotoFeedWithURL:feedURL delegate:self
didFinishSelector:@selector(albumListFetchTicket:finishedWithFeed)
didFailSelector:@selector(albumListFetchTicket:failedWithError:)];

   //Then insert a new album entry into that feed:
   GDataEntryPhotoAlbum* newAlbum = [GDataEntryPhotoAlbum
albumEntry];

   [newAlbum setTitleWithString:@"foo"];
   [newAlbum setPhotoDescriptionWithString:@"bar"];
   [newAlbum setAccess:kGDataPhotoAccessPublic];

   NSURL *postLinkV = [[feedURL postLink] URL];

ticket = [service fetchPhotoEntryByInsertingEntry:newAlbum 
forFeedURL:postLinkV
delegate:self
didFinishSelector:@selector(albumCreationTicket:finishedWithEntry:)
didFailSelector:@selector(albumCreationTicket:failedWithError:)];

The issue I am having is with the PostLink statement. Any help would be appreciated. The debugger is saying that there is an unexpected argument. Hmm.... Thanks, Pat