It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) and his Companions (may Allah be pleased with them) prayed facing towards Bayt al-Maqdis for sixteen months; then after that the qiblah was changed.
Mu'awiyah bin Amr narrated this hadith from Za'idah.
And Imam Ahmad (may Allah have mercy on him) also narrated it through Abd al-Rahman from Za'idah.
It has a supporting narration (shahid) in the two Sahihs, through the narration of Abu Ishaq Amr bin Abdullah al-Sabi'i (may Allah have mercy on him), from Sayyiduna al-Bara' bin Azib (may Allah be pleased with him), that when the Prophet (peace and blessings be upon him) came to Madinah, he (peace and blessings be upon him) prayed facing towards Bayt al-Maqdis for sixteen or seventeen months.