A Cohasset teacher, unschooled in the ways of Facebook, learned a stinging lesson this week after she lost her job over a post she put on her page.