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

uploadpicture, grabbing the description field

Topics: Developer Forum, User Forum
Dec 18, 2009 at 1:41 PM

Is there anyway to grab the description that I supplied when I uploaded the photo?

I don't see the property in the Flickr.Photocollection.  Is there another object that i can use to pull that information?

Dec 18, 2009 at 1:45 PM

You need to call Flickr.PhotosGetInfo to get a photos description.

Dec 18, 2009 at 3:43 PM

Thanks, is there a way to add it that information to the photocollections as a property or create an array that will hold the photocollection information and the description.

Here is my code:

        Dim flickr As New FlickrNet.Flickr()
        Dim options As New FlickrNet.PhotoSearchOptions()
        flickr.CacheDisabled = True

        options.UserId = ConfigurationManager.AppSettings.Get("UserId")
        options.PerPage = 20
        options.SortOrder = FlickrNet.PhotoSearchSortOrder.DatePostedDesc

        Dim photos As FlickrNet.Photos = flickr.PhotosSearch(options)
        Dim photoInfo As FlickrNet.PhotoInfo

        If photos.PhotoCollection Is Nothing Then
            Return New FlickrNet.PhotoCollection()


            Some where in here I want to be able to take the photoinfo variable and add the description to each photo pulled.

            I tried this:

            Dim i As Integer = 0

            While i < photos.PhotoCollection.Length
                photoInfo = flickr.PhotosGetInfo(photos.PhotoCollection(i).PhotoId)
                i += 1
            End While

            But I don't know how to return the description for each photo in the collection, since we are returning the entire collection.

            Return photos.PhotoCollection
        End If

I am wanting to do something like this:

weburl, title, description

and then have each value underneath that I can access through the datalist but I am not sure how to do this.



Dec 18, 2009 at 4:26 PM

Well there is no way for me to do that, or rather if I did it would confuse more people than it would help.

You however can do anything you want, either create a new class with just the fields you want or modify the source to include a description property.