Her body may not be mature enough yet to poop on demand. The body is ready first for urine training and most kids don't poop train for several more weeks or perhaps months later.
Please don't push her. If you insist that she do what her body is not able to do you're setting up a negative atmosphere which will continue to cause difficulties even after she's ready to do it.
One way to tell when she's ready is to watch her face. You can tell when she's aware she has to poop by the way she looks. You can rush her to the toilet when you see that she's about to poop. Please don't be in a rush to get her trained. Wait until her body is mature enough to do it.
She may have said she needed to poop because she wanted to please you. Unless she pooped within 5-10 minutes after she got off the toilet, I suggest she didn't have to poop at the time.
If you think she is ready then make sitting on the toilet fun. Provide books and toys for her to play with. They will help distract her from the pressure or insistence that she poop now. She's more likely to poop if she's relaxed.
Pay attention to the time she usually poops and set her on the toilet. Don't insist that she poops. Stay with her, play with her, sing silly games. If she hasn't pooped in 10 minutes or so, take her off. She'll get used to sitting.
She may be afraid of the poop disappearing down the toilet. Some kids think that the poop is a part of them and it scares them to see it flushed away. This may be part of the problem. Talk with her about the poop, why we put it out of our body and where it goes. OR not. Only flush the toilet when she's not in the room.
Don't despair. She'll get it and get it faster if it's not such a big deal.