cant believe what some people have told you to do! A lot of children are anxious about doing poos in toilet or potty. First thing you must do is to get rid of pull ups and put proper pants on.
My son was very young when we potty trained him (20mths) so it is a bit different. It might be a bit harder for you as hes a little older but its still possible, just be positive!
My son was worried at first, only about poos so i was just really relaxed about it and didnt try to persuade him or get him to do it. I gave him lots of attention playing with him lots.
I would then look out for the signs he was going to do a poo and either catch it in the potty or put him on the toilet. Then when he saw it in there i would say, well done you got it the potty ,clever boy, what a lovely poo! I never said anything negative about it and if it went on the floor or in his pants i just said, never mind next time we'll get it in the potty.
After a bit of time doing this he started to sit on the potty himself to do a poo, i gave him a treat/prize every time and lots of praise. He was soon over his fear completely and would do it on the toilet no problem. Hope this helps you!