Ouch, yes that must have hurt and it will be sore for a few days, be sure to keep an eye on it for a while to make sure nothing further develops but he should be fine. No wonder he doesn't want to be touched right now, just like us sometimes when we hurt we don't want anyone fooling with us and you may think he no longer likes you but he will be back to his old self when the soreness goes away. Thats why I love the upper door of my grey's cage, it opens down so no chance the door will swing back and catch a leg, the main door stays shut.
Not to worry he does not hate you, he just doesn't feel like getting scratches right now but soon he will, I promise.