Social media often brings out the worst in people, with the anonymity of many platforms fuelling hostility towards strangers.