The Prophet ﷺ gave the family of Jafar three days before coming to them. Then he came to them and said, "Do not weep for my brother after this day."Then he said, "Bring me the sons of my brother."We were brought to him as if we were young chicks. He said, "Call the barber for me," and he ordered him to shave our heads.Ahmad added in his narration, Then he said, "As for Muhammad, he resembles our uncle Abu Talib, and as for Abdullah, he resembles me in form and character." Then he took my hand and raised it and said, "Allah, succeed Jafar in his family, and bless Abdullah in the deals of his right hand." He said this three times.He said, Then our mother came and mentioned our orphanhood to him, and she began to express her grief to him. He said, "Is it poverty you fear for them, when I am their guardian in this world and the next?"
أن النبي ﷺ أمهل آل جعفر ثلاثا أن يأتيهم، ثم أتاهم فقال: لا تبكوا على أخي بعد اليوم ثم قال: ادعوا لي بني أخي فجئ بنا كأنا أفرخ، فقال: ادعو لي الحلاق فأمره فحلق رؤوسنا. وزاد أحمد في روايته: ثم قال: أما محمد فشبيه عمنا أبي طالب، وأما عبد الله فشبيه خلقي وخلقي ثم أخذ بيدي فأشالها فقال: اللهم اخلف جعفرا في أهله، وبارك لعبد الله في صفقة يمينه قالها ثلاث مرات. قال: فجاءت أمنا، فذكرت له يتمنا، وجعلت تفرح له، فقال: العيلة تخافين عليهم، وأنا وليهم في الدنيا والآخرة.
Abu Dawud (4192) and Nasai (5227) both narrated it from the hadith of Wahb bin Jareer, who said, "My father narrated to us," and said, "I heard Muhammad bin Abu Yaqub narrating from Hasan bin Saad, from Abdullah bin Jafar," and he mentioned the hadith in abridged form. Imam Ahmad (1750) narrated it from Wahb bin Jareer with his chain of transmission in fuller form, as I have mentioned part of it, with the remaining part in the appropriate places, and its chain is sahih. Hakim (3/298) also extracted a portion of it and said, "Sahih al-Isnad."A note of caution, "Hasan bin Saad" is missing from Nasai's Mujtaba, but it is confirmed in his Sunan al-Kubra (9295), so take note.As for his statement, "so he shaved our heads," this was because their mother was preoccupied with the calamity, distracted from combing their hair and washing their heads, so he feared for them the accumulation of dirt and lice, as Suyuti pointed out.