There are three things you can not make a child do, eat, sleep or pee and poop on command. (sigh) My son was finally "trained" when I went to meet his four year old preschool teacher before the class started. I told her that he was still in diapers. She said that she did not usually take children that were in diapers and did not ever change diapers, within earshot of my son.
All of my son's friends were going to that preschool, so naturally he really wanted to go to that school. He was completely trained in 24 hours. Easiest thing I never did.
Perhaps you can find something that will be motivating to him (not candy or stickers, etc...) that will make him want to use the toilet when he goes poop.