Potty Training-Going #2 in the potty

So we put my 3 year in underwear right around his 3rd birthday on November 23. And he has been doing great with going #1, only 2 accidents, but he refuses to go #2. He waits until he is in a diaper for his nap or for bedtime and then goes. I have only managed to get him to go 3 times and it took a lot of work each time. Any tips? Suggestion?

    Major treats for going #2 in the potty! My first child didn't like to go poop either for a while, and I think it was because she was kind of dehydrated/constipated so it hurt while she went. She would do the same thing. I started giving her Mirilax and the first time she went without it hurting we praised and praised! Plus it may have been to she was a dainty little girl and I let her walk around in panties for one whole weekend and she did not like going potty in her pants! Make sure his poops aren't hurting him though. I say praise but still be firm. Accidents happen but at some point too, they know they can go potty and it isn't ok anymore, good luck to you!