Question

I'm working on a app that collects random pictures from flickr to use as placeholder images. I just had an incident with a client where one of the placeholders images was too explicit and now I think it is better to filter the results. I know flickr does have a safety level on the images.

As far as I got the safety level is set per user. Is it possible to set it during an API call?

This is the call I'm using:

flickr.interestingness.getList
Was it helpful?

Solution

There is a 'safe search' argument you can pass in when setting your search parameters.

Safe search setting:

  1. for safe
  2. for moderate
  3. for restricted

Your code should look like this:

NSMutableDictionary *params = [NSMutableDictionary new];
[params setObject:@(1) forKey:@"content_type"];

safe_search (Optional) Safe search setting: 1 for safe. 2 for moderate. 3 for restricted.

Click here for more details from the flickr api website

OTHER TIPS

Flickr API does have options for filtering search results via the "safe_search" setting.
Values -
1. for safe
2. for moderated
3. for restricted

But unfortunately there are many photos that are uploaded and not been marked as unsafe. So even though this setting will filter results at some level but its not completely reliable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top