title: Inserting Images in Specific Album on Picasa in iOS
body: <p>I am working with an iOS application in which i upload images on Picasa web albums from my iOS application.When i create album firstly i check whether any album with the same name exist or not so i fetch all the albums with their name and album id with the below code.</p>
  
  <pre><code>for (GDataEntryPhotoAlbum *albumEntry in feed)
          {
              NSString *title = [[albumEntry title] stringValue];
              NSString *title1 = [albumEntry GPhotoID];
              NSLog(@"File Title:  %@ | ID: %@",title,title1);
          }
  </code></pre>
  
  <p>i get all the album name and albumid .
  now i check with the current album name  given by the user.</p>
  
  <pre><code>  if ([title isEqual:albumName]){
         //do not create new album
         // return the album id
       }
     else{
    //create new album
     }
  </code></pre>
  
  <p>Everything working fine ,but now the problem is how can i send the albumid to the uploading method  which is below mentioned:</p>
  
  <pre><code>  - (void)_startUpload:(UIImage *)image:(NSString *)filePath{
  
          NSLog(@"album feed is %@",albfeed);
         // user/11106615845/albumid/6029121 gphotoID:60291215413
        //GDataFeedPhotoAlbum *albumFeedOfPhotos = [self photoFeed];
  
          //https://photos.googleapis.com/data/upload/resumable/media/create-session/feed/api/user/114789383162963173862/albumid/6025392474120084449
         //https://photos.googleapis.com/data/entry/user/1082642086705/albumid/60254095886065
          NSURL *uploadURL1 = [[[albfeed uploadLink] URL] retain];
  
          NSString *photoPath = [[NSBundle mainBundle] pathForResource:@"red_bull" ofType:@"jpg"];
          NSString *photoName = [photoPath lastPathComponent];
          NSLog(@"uploadURL1  : %@",uploadURL1 );
          NSLog(@"photoPath : %@",photoPath);
          NSLog(@"photoName : %@",photoName);
            NSData *photoData = [NSData dataWithContentsOfFile:filePath];
  
          if (photoData) {
              GDataEntryPhoto *newEntry = [GDataEntryPhoto photoEntry];
              [newEntry setTitleWithString:photoName];
              [newEntry setPhotoDescriptionWithString:filePath];
              [newEntry setTimestamp:[GDataPhotoTimestamp timestampWithDate:[NSDate date]]];
              [newEntry setPhotoData:photoData];
              NSString *mimeType = [GDataUtilities MIMETypeForFileAtPath:filePath
                                                         defaultMIMEType:@"image/jpeg"];
              [newEntry setPhotoMIMEType:mimeType];
              [newEntry setUploadSlug:photoName];
              GDataServiceGooglePhotos *service = [self googlePhotosService];
              SEL progressSel = @selector(ticket:hasDeliveredByteCount:ofTotalByteCount:);
              service.authToken = authTokens;
              [service setServiceUploadProgressSelector:progressSel];
              GDataServiceTicket *ticket;
              ticket = [service fetchEntryByInsertingEntry:newEntry
                                                forFeedURL:uploadURL1
                                                  delegate:self
  
  
  didFinishSelector:@selector(addPhotoTicket:finishedWithEntry:error:)];
          [service setServiceUploadProgressSelector:nil];
      }else {
          NSLog(@"@@@ Image not loaded");
      }
  i don't know how will i send the specific albumid so that i don't need to create a new album ,if that album is already found in my account.
  </code></pre>
  
  <p>How can i achieve that??</p>
  
  <p>I don't want to create another album with the same name,,get the albumid and upload images on the previous album.
  please help me out.
  Thank you for your precious time.</p>