I think that friend should have first cleared it with the mother (if she was close to the daughter) and then posted it. Or at least wait 24 hours.
Well, in this case, the conversation would have been,
"Hey, is it all right if I spread the news about your daughter's death on Facebook?"
"... what about my daughter?!?!"
I can't see this would have been an improvement, with the exception that the person would have learned a lot about how NOT to deal with sudden death.
Even if the mother had been informed, the first contact should not involve a request that the contacter have the glory of being the first one to make the new public. At the most, after giving his/her condolences, the contacter may ask, "Would it help if I notified people for you?"