They could lay her off at the completion of her FMLA absence, which I am certain was already set up if she's measuring the time in weeks.
Given how tied pregnancy care is to a primary provider, and how health professionals (and the scheduled "give birth at this place with this team") are tied to your specific insurance brand and networks, this puts the woman in a particularly bad spot.
So FB could have shown compassion and spared her job because she is pregnant... but can they legally do so, without being exposed to lawsuits?
The article doesn't mention severance. Seems to me that a generous severance is the right solution here.