(5) بَاب اسْتِحْبَابِ تَحْنِيكِ الْمَوْلُودِ عِنْدَ وِلَادَتِهِ وَحَمْلِهِ إِلَى صَالِحٍ يُحَنِّكُهُ وَجَوَازِ تَسْمِيَتِهِ يَوْمَ وِلَادَتِهِ وَاسْتِحْبَابِ التَّسْمِيَةِ بِعَبْدِ اللَّهِ وَإِبْرَاهِيمَ وَسَائِرِ أَسْمَاءِ الْأَنْبِيَاءِ عَلَيْهِمْ السَّلَام
Anas b. Malik reported that the son of Abu Talha had been ailing. Abu Talha set out (on a journey) and his son breathed his last (in his absence). When Abu Talha came back, he said (to his wife):
What about my child? Umm Sulaim (the wife of Abu Talha) said: He is now in a more comfortable state than before. She served him the evening meal and he took it. He then came to her (and had sexual intercourse with her) and when it was all over she said: Make arrangements for the burial of the child. When it was morning. Abu Talha came to Allah's Messenger (ﷺ) and informed him, whereupon he said: Did you spend the night with her. He said: Yes. He (the Holy Prophet) then said: O Allah, bless both of them (and as a result of blessing) she gave birth to a child. Abu Talha said to me (Anas b. Malik) to take the child, (so I took him) and came to Allah's Messenger (ﷺ). She (Umm Sulaim) also had sent some dates (along with the child). Allah's Apostle (ﷺ) took him (the child) (in his lap) and said: Is there anything with you (for Tahnik). They (the Companions) said: Yes. Allah's Apostle (ﷺ) took hold of them (dates and chewed them). He then put them (the chewed dates) in the mouth of the child and then rubbed his palate and gave him the name of 'Abdullah.
Reference: Sahih Muslim 2144 b
In-book reference: Book 38, Hadith 28
USC-MSA web (English) reference(deprecated numbering scheme): Book 25, Hadith 5341