A Frenchman has been charged with illegally keeping four young macaques after posting about them on social media.