Ja'far bin Muhammad (may Allah have mercy on him) narrates from his father (Muhammad al-Baqir (may Allah have mercy on him)) that the Prophet (peace and blessings be upon him) took the pledge of allegiance from Hasan, Husayn, Abdullah bin Abbas and Abdullah bin Ja'far (may Allah be pleased with them) while they were young and had not yet reached puberty. (The narrator) said: "And he (peace and blessings be upon him) did not take the pledge from any young child except from among us."
Hadith Referenceالمعجم الكبير للطبراني / باب الحاء / 2830