A quick Google search brings up loads of Yahoo Answers posts, all the answers of which agree with the saying... but I really think I have to disagree.
A lot of the posts mention conformity, and staying true to yourself, etc, but I think if you are hated on a large scale then it is maybe an indication that you need to change your personality. Everyone changes how they act around some people to some scale. Most people wont swear around their nan for example. I adapt my personality when I think someone I'm speaking to won't like some things I do.
I'm pretty sure I would rather be loved by people, and hide aspects of my personality than be hated by everybody. I don't think that makes me weak or shallow.
I think it could only be murderers, rapists, paedophiles and goths that agree with this perhaps.