Fully agree.
If you are authentic you won't be liked by everyone, neither by most people; but you will be liked by the right people for you. (*)
(*) A caveat, though: this works only when you are a healthy and balanced individual. If you're too negative, whiny, bitchy or obnoxious, your being authentic won't "magically" turn you into someone likable. First you'll have to "straight up" yourself into someone you like to be.
BTW, this is the problem with the "Just be yourself" advice: if "yourself" is a big bundle of neuroses, being yourself will just show your neuroses and push people away.