It was the practice of the Prophet (peace and blessings be upon him):
"When one of his (peace and blessings be upon him) Companions met him (peace and blessings be upon him), he (peace and blessings be upon him) would touch him affectionately and supplicate for him."
Hadith Referenceصحیح الجامع الصغیر / حرف الكاف / 4781
Hadith Gradingالألبانی:صحيح
Hadith Takhrij[ن] عن حذيفة. صحيح أبي داود ٢٢٤: حب.