A fine control of a photonic molecule is obtained by nanofluidic techniques. The coupling condition between the modes of two photonic crystal nanocavities is modified by spectrally tuning each single resonator. Clear mode anticrossing and transition from localized to delocalized states are observed. The detuning induced by disorder, always present in real device, is experimentally compensated by locally modifying the photonic environment of the cavity.