public void setPerms ( String photoId , GeoPermissions perms ) throws FlickrException { Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_SET_PERMS ) ; parameters . put ( "photo_id" , photoId ) ; parameters . put ( "is_public" , perms . isPublic ( ) ? "1" : "0" ) ; parameters . put ( "is_contact" , perms . isContact ( ) ? "1" : "0" ) ; parameters . put ( "is_friend" , perms . isFriend ( ) ? "1" : "0" ) ; parameters . put ( "is_family" , perms . isFamily ( ) ? "1" : "0" ) ; // Note: This method requires an HTTP POST request. Response response = transport . post ( transport . getPath ( ) , parameters , apiKey , sharedSecret ) ; // This method has no specific response - It returns an empty sucess response // if it completes without error. if ( response . isError ( ) ) { throw new FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } }
Set the permission for who may view the geo data associated with a photo .