I hurt my finger on a cactus?

I forgot it was on the kitchen window and I touched it by mistake and had four spikes in my finger which I'm pretty sure I got all of them out as isn't hurting as much now, didn't bleed or anything, but can I get an infection from it?
I hurt my finger on a cactus?
Post Opinion