Hi C., I have had the same problem with my now 4 year old son. He started te same thing when he was 3, maybe even 2. He finally became fully potty trained when he was 3 1/2 or so. This is what I have found to help.
His pediatrician tried to give him laxatives which onlt made the problem worse because then he would have accidents. I went the natural way and it has been the only thing to work. Most likely your son won't go because he had a bad experience with it being painful in the past.
On a daily basis I give my son a teaspoon of either cod liver oil or Scott's Immulsion (in the morning), I buy at the supermarket BoltHouse Farms Berry Drink(blue bottle), you can usually find it near the fruit and it's a smoothie consistency, it's organic and is full of fiber, 8 grams of fiber per serving! It tastes great so is more of a treat to drink.
Even though it's not constipation this will make it more comfortable for him to go, so after a few times he will realize it doesn't hurt anymore.
As far as potty training, the only thing that worked to get him completely potty trained was anytime he was at home, I took off his pull ups so he didn't have anything on, when he had to use the bathroom he knew the only choice was to go to the potty, it took only 2 weekends of this and then I started sending him to daycare with his big boy underwear....he never had any problem since.
Hope this info helps.
I still have to be on top of him and sometimes bribe him to go #2....If I see that it's been 2 days and no potty, I tell him if he goes #2 on the potty he will get a surprise...cookies or some treat. It works every time.