It can be pretty annoying (or at least confusing) when a film based on a book doesn't really match up with how the book conveyed the story. This is a matter of interpretation, and unfortunately, a lot of film interpretations make changes to what was presented in the book. For example, many fans of the Harry Potter series feel that some important characters—like the poltergeist Peeves—were left out of the films. With The Fault in Our Stars, it's not as serious as leaving characters out, but I do agree that there were major differences in the attitudes of book-Hazel and film-Hazel.
In the book version, John Green wrote Hazel Grace Lancaster as a somewhat jaded character. She was very smart, had a deep sense of conscience, and had been struggling with cancer for a long time. Such things made her a little abrasive to some people. When she first met Augustus Waters in their cancer support group, she thought he was pretentious and full of himself. (He was—at least, being full of himself compensated for some deep-seated insecurities. John Green wrote him this way on purpose.) When Augustus wanted to befriend Hazel, she was a bit rude to him because she didn't think Augustus' high opinion of himself was deserved or welcome. What's more, when he pulls out a cigarette, she is disgusted! How could someone with cancer have the audacity to smoke? In front of others with cancer?! Thankfully, he does not smoke the cigarette and instead uses it as a visible metaphor for power over death.
In the film, Hazel and Augustus' interactions move a little more smoothly. I think that the director intended to soften Hazel a little in order to foster the feeling of young love. John Green was heavily associated with the production of the film, but did not have control over every aspect, so it is difficult to say how much he agreed or disagreed with changes to Hazel's attitude. Nonetheless, it's all a matter of interpretation between how readers understand Hazel and how the director wanted to portray her.