How Facebook helped stop the erosion of democracy