Note that there are some explanatory texts on larger screens.

plurals
  1. POCheck what size photos are available from Flickr
    primarykey
    data
    text
    <p>I'm using objectiveflickr to pull a list of images from a flickr.photos.search query.</p> <p>I have it working where I pull in the thumbnail and the large size image, however sometimes an image doesn't have a large size available and so in the app it displays flickr's image unavailable image. I checked what is returned through the flickr API and the URL's are regular flickr URL's, so there's no way to tell if an image will or will not have a large image that way.</p> <p>The only way I can think of doing this is to create another objective flickr delegate and have it do a flickr.photos.getSizes API call and check against each photo.</p> <p>Anyone have any other suggestions?</p> <p>Here's my code:</p> <pre><code>- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didCompleteWithResponse:(NSDictionary *)inResponseDictionary { int requestedPhotoTotal = [[[inResponseDictionary objectForKey:@"photos"] valueForKey:@"perpage"] intValue]; for (int i=0; i &lt; requestedPhotoTotal; i++) { NSDictionary *photoDict = [[inResponseDictionary valueForKeyPath:@"photos.photo"] objectAtIndex:i]; NSString *title = [photoDict valueForKey:@"title"]; NSURL *photoURL = [context photoSourceURLFromDictionary:photoDict size:OFFlickrLargeSize]; NSURL *thumbURL = [context photoSourceURLFromDictionary:photoDict size:OFFlickrThumbnailSize]; NSURL *photoSourcePage = [context photoWebPageURLFromDictionary:photoDict]; Photo *p = [[PhotoStore sharedStore] createPhoto]; [p setURL:photoURL]; [p setThumbURL:thumbURL]; [p setSource:photoSourcePage]; [p setTitle:title]; NSLog(@"%@ - %@", title, [photoURL absoluteString]); } [self showGallery]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload