I'm horrified that anyone shares anything about their child, unborn or otherwise, on a social media platform. Shouldn't that child have the right to choose for themselves if they want literally their entire lives archived by advertisers?
Yes, she shouldn't have posted about her pregnancy on social media sites.
*Edit to add - There are a lot of other ways to share with friends and family about her pregnancy that aren't social media.