This project has moved and is read-only. For the latest updates, please go here.

Change Primary Photo for Photoset

Topics: Developer Forum, User Forum
Aug 28, 2009 at 4:47 PM
Edited Sep 1, 2009 at 5:53 PM


I am trying to change the primaryphoto on a photoset. This is the only way that I have found to do this. However, I would think that there would be an easy way to do this.

flickr.PhotosetsEditPhotos(albumID, primaryPhotoID, arrayOfPhotosInAlbum)

I tried using this but it did not save, so the next time I loaded the photoset it was still the old one.

  Dim photoSetInfo As FlickrNet.Photoset = flickr.PhotosetsGetInfo(albumID)
            photoSetInfo.PrimaryPhotoId = flickrPrimaryPhotoID

Is there something that I am doing wrong? Any help would be greatly appreciated.






Sep 1, 2009 at 12:57 PM

It isn't clear from your code above what photoIds and photoId are.

Is it changing on Flickr? It might be possible that PhotosetsGetInfo might be being cached.


Sep 1, 2009 at 5:51 PM

Thank you for your response. 

PhotoIds is just an array of photoIds inside of the album. I just loop around the photoset and get all the photoIds and put it into the string. 

The photoId is the primaryPhotoID.  I will make a change that will call it primaryPhotoID.

The top function works and it successfully changes the primary photo, however I feel that it should be much easier to change the primary photo.

I believe the second function should work as it is, you should not have to do everything the top function requires. 

It is not being cached because I checked the flickr's website and it was the old photo still on there.

Thank you,


Sep 2, 2009 at 10:27 AM

I have no control over what methods the Flickr API provides - the only method that changes the primary photo is the flickr.photosets.editPhotos method, so if the first method above is working then there is nothing more I can do to help I'm afraid.