For a very short period.
Phones became a mainstream way of communication in the 1880s.
Public transport, in the form of trains and buses and street cars have become widespread in the early 1800s, mostly around 1830-1850 (e.g. London had railway services but the first underground service opened in 1863).
Mind you, most of these services were connecting small-ish town sections (even London wasn't really a unified city until the 1900s, but a bunch of parishes, boroughs and towns connected by railway), so your "friend living on the other side of town" was usually a 15-30 minute walk away at most. In fact most people, the average people anyway, had friends only in the local community as they've rarely left said community and ventured beyond their immediate vicinity. Those who'd have friends from far away - let it be a city a few dozen to a few hundred miles away or even another country - would be either the upper class (nobility and high earning professions like solicitors), or merchants (also rich). Long distance travel was a luxury most couldn't afford.
It was the industrialisation that allowed for cheaper transport and for towns to grow larger and denser, so the overlap of the availability of public transport, the NEED for such transport to meet friends, and the lack of telecommunications wasn't as widespread as one would think.
mech@feddit.org 10 hours ago
They were certainly around before most people had a telephone.
My mother grew up in a household without a telephone. In a big city. She was born in 1951.