It's actually not that stupid. You had feelings for this person that played with your emotions. It also doesn't matter that it was done online. Would it be any different if it was someone you see regularly? like at School or Work?
It would certainly not. If you have had someone do that to you in ANY way, it is not stupid or dumb to be upset. We all have feelings. But some people do not care. They like to hurt and damage people for one reason or another. We certainly don't have enough information here to determine why this person did that to you.
It is easier now that it has been, especially to be anonymous over the internet, on dating sites, and social media to pretend to be something you aren't (age, weight, gender, looks, belief systems, sexual orientation, and many more). It is also easier to pretend to say you love someone because a lot of the times you do not have the physical tells (body, facial language, eye contact) to see if someone is saying it to say it or do they mean it.
It isn't right, however unfortunately it is not illegal.