Sayyiduna Jarir (may Allah be pleased with him) said: I saw the Prophet (peace and blessings be upon him) and said: "I pledge allegiance to you on hearing and obeying in what I like and what I dislike." The Prophet (peace and blessings be upon him) said: "Are you able to do that, O Jarir? Or do you have the strength for that? Say: As far as I am able." He said: I said: "As far as I am able." He said: So he (peace and blessings be upon him) took my pledge, and also on acting sincerely towards the Muslim.
Hadith Referenceالمعجم الكبير للطبراني / باب الجيم / 2343