All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The statement said by your friend was said as a way of reminding the third person that he should have shaken your hands. It is obvious that he did not intend to make what is lawful prohibited, because he said it is a form of objecting to what he did and not approving of it. It is as if he said to him: “Is shaking hands prohibited and so you did not shake our hands?”
We draw your attention that ruling a Muslims to be non-Muslim is a dangerous matter that one must avoid and beware of, and this is why the scholars have set restrictions to govern this issue; please refer the following Fataawa for details on this matter: 8106 and 87963.
Allah knows best.