Yahya related to me from Malik from one of the Ansar that theMessenger of Allah, may Allah bless him and grant him peace, forbadedefecating or urinating while facing the qibla.
USC-MSA web (English) reference: Book 14, Hadith 2
Arabic reference: Book 14, Hadith 459
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.