He had received it from the Prophet ﷺ, who said, "When a man loves his brother, let him tell him that he loves him."
حدثنا مسدد حدثنا يحيى عن ثور قال حدثني حبيب بن عبيد
وقد كان أدركه عن النبي ﷺ قال إذا أحب الرجل أخاه فليخبره أنه يحبه
[Its isnad is hasan] Tirmidhi narrated it, Zuhd, chapter on what has been reported concerning signs of love, no. 5125, from the hadith of Yahya Qattan, with this wording, and he said, hasan sahih ghareeb, and Ibn Hibban graded it sahih, no. 2514.