Sayyiduna Abu Umamah (may Allah be pleased with him) narrated: A man came to the Messenger of Allah (peace and blessings be upon him) and said: O Messenger of Allah, what do you say about a man who seeks both reward and fame; what will he get? He (peace and blessings be upon him) said: "He will get nothing." He (peace and blessings be upon him) repeated this three times. "Indeed, Allah, the Mighty and Majestic, accepts of deeds only that which is purely for Him and by which His Countenance is sought."
Hadith Referenceالمعجم الكبير للطبراني / باب الصاد / 7597