Russian opposition activist Alexei Navalny has been detained after a visit to the dentist, he said on Twitter.