Honesty or positivity?

I'm an honest person, I don't normally lie. So my opinions can be kind of harsh sometimes but they're always my honest opinion. Obviously I won't go out of my way to hurt people's feelings, I just feel like I need to be as honest and open as possible

Apparently my friend doesn't like this, she says even though I'm being honest my mainly realistic views on certain things brings down her mood and piss her off.

I'm not saying she lies a lot, but she's really optimistic and "nice" to the point where she'll tell everyone she hates someone behind their back but as soon as she's faced with the person she acts as if their best friends.

I dont know how to deal with my situation. On one hand I want to keep my friend happy and be more positive. However on the other hand I want to stay true to myself.

Anyone else ever gone through something similar or know how to deal?