I heard the Prophet ﷺ say, five days before he died, "I declare before Allah that I have taken none of you as an intimate friend, for Allah the Exalted has taken me as His intimate friend, just as He took Ibrahim as an intimate friend. Had I been to take an intimate friend from my community, I would have taken Abu Bakr as such. Beware, those who came before you used to take the graves of their prophets and righteous ones as places of worship. Beware, do not take graves as places of worship. I forbid you from doing so."
سمعت النبي ﷺ قبل أن يموت بخمس وهو يقول: إني أبرأ إلى الله أن يكون لي منكم خليل فإن الله تعالى قد اتخذني خليلا كما اتخذ إبراهيم خليلا ولو كنت متخذا من أمتي خليلا لاتخذت أبا بكر خليلا ألا وإن من كان قبلكم كانوا يتخذون قبور أنبيائهم وصالحيهم مساجد ألا فلا تتخذوا القبور مساجد إني أنهاكم عن ذلك.
Muslim narrated it in the chapters on mosques (532:23) through several routes from Zakariya bin Adi, from Ubaydullah bin Amr, from Zayd bin Abu Unaysa, from Amr bin Mura, from Abdullah bin Harith Najrani, who said, Jundab told me, and he mentioned it.As for what has been narrated from Abdullah bin Amr, who said, the Messenger of Allah ﷺ said, "Allah has taken me as a close friend just as He took Ibrahim as a close friend. So my dwelling and the dwelling of Ibrahim will be in Paradise on the Day of Resurrection, facing each other, with Abbas between us, a believer between two close friends," this is very daif.It was narrated by Ibn Majah (141), Ibn Hibban in Majruhin (2/148), and Tabarani in Musnad Shamiyin (936), all of them through the route of Abdul-Wahhab bin Dahhak, who said, Ismail bin Ayyash told us, from Safwan bin Amr, from Abdul-Rahman bin Jubayr bin Nufayr, from Kathir bin Mura Hadrami, from Abdullah bin Amr, who said, and he mentioned it.Abdul-Wahhab bin Dahhak is daif by the unanimous agreement of the scholars. Ibn Hibban said, "He used to steal hadiths and narrate them, and he would answer whatever he was asked, and he would narrate whatever was read to him. It is not permissible to cite him as evidence, nor to mention him except by way of caution."Busiri said in Misbah Zujaja, "This chain is daif, since they agree on the daif status of Abdul-Wahhab. Indeed, Abu Dawud said of him, He fabricates hadith..."