Yes. Nevertheless, according to the law, you should always ask for explicit permission to take a picture of someone or to share it on social media. You can’t take pictures in restricted areas or borders. If you doubt, better not to do it (or ask first and make sure you can).