Don't ever rub an injection site or apply hot/cold. You likely just nicked a vein with a shaky hand and have a small subcutaneous hematoma. (under the skin bruising)
If the pain gets to be a little much, take an ibuprofen. It should get better in a week or so. If it's still there in two weeks, or you develop spiderweb-like veins at the site - time to see a doctor for that nasty B12 shot gone wrong.
My .02c