At least one protester has been arrested for throwing a shoe at Iranian President Mahmoud Ahmadinejad during a visit to a mosque in Egypt's capital, Cairo.