I read 'intimate friends' as a metaphor for homosexuality; or at least what is now known as. Although buggery in itself was a capital offense, AFAIA before the later part of the century there was no prescribed behavioural or other stereotype for a gay person. Victorian men were all just a bunch of straight dudes.
src wikipedia:
'Foucault cites "Westphal's famous article of 1870 on 'contrary sexual sensations'" as the "date of birth" of the categorization of the homosexual'
I take it as don't really, deeply trust anyone. It's hard to unpack given the drift in meanings of things like 'intimate'. It could mean don't have affairs with women, or it could mean don't go sharing your secrets. Given the very next line is about keeping secrets to yourself, that's how I take it.