This excerpt is taken from the book by Fazilat-ul-Sheikh Abdul Salam Rustami From Denial of Hadith to Denial of Quran.
Hadith 17: Prediction of Apostasy of Some Muslims
On the Day of Judgment, a few people will be brought and the angels will take them towards Hell. At that time, I will say: O Lord! These are my companions. The reply will be: These people apostatized after your death.
Reference: Sahih al-Bukhari, Tafsir, Chapter: And I was a Witness, Hadith: 4625
After recording this hadith, Mr. Parvez wrote that this is said about some senior companions. (May Allah forbid) Can you also imagine that the Messenger of Allah (peace be upon him) would have said this?
Reference: Maqam al-Hadith, p. 187
Answer:
The hadith is absolutely authentic, which makes it clear that the Prophet Muhammad (peace be upon him) did not have knowledge of the unseen, just as Jesus (peace be upon him) did not have knowledge of the unseen. Furthermore, there is no doubt that some people apostatized after the death of the Prophet Muhammad (peace be upon him), but they were not prominent companions; rather, they were a few newly converted Muslims with whom Abu Bakr (may Allah be pleased with him) fought jihad. They cannot be called companions in the legal terminology because, in the terminology of Shariah, a companion is one who saw the Prophet Muhammad (peace be upon him), believed in him, and remained in a state of faith until death. Some scholars also say that they refused to pay zakat, which legally constitutes true apostasy.