Back in 2012, John Green didn’t know that his young-adult novel “The Fault in Our Stars” – the achingly sad love story of two teenagers with terminal cancer – would become an international bestseller and later, a major motion picture. He also didn’t know that he would have to spend the next 2 1/2 years talking at length about some of the most grim subjects imaginable: Teenagers who have cancer. Kids who are dying. What it might be like to die. How people think about death.

That can take an emotional toll on anyone. That includes Green, who has become somewhat of a beloved older brother to his young fans across the world, the ones who cling to every word in his books and Tumblr posts and YouTube videos. Still, he sums up the experience like this: “It’s a blessing.”

Yes, he admits, the devastating topics explored in the book and the new film have been a bit of a drain on his psyche. But he wouldn’t change a thing.

“The book has had such a wonderful reach that I’ve gotten to talk to people about it who I never imagined would read it – young people living with cancer, parents who have lost kids. That’s tremendously rewarding to me,” Green said. He’s speaking by phone from Pittsburgh, where the movie was filmed and where a special screening was scheduled a week before the movie’s release. “So I’m very grateful for that, and grateful that so many people have responded to the book so generously.”

“Generously” is an understatement. The novel, told from the perspective of Hazel, a highly intelligent, wry 16-year-old battling cancer and whose “lungs suck at being lungs,” has sold 10.7 million copies internationally and spawned a fiercely devoted fan base. The movie adaptation, starring Shailene Woodley as Hazel and Ansel Elgort as her sparkling love interest Augustus, is projected to be a hit on its opening weekend. Ticket agency Fandango reported the film has shattered pre-sale records for a romantic drama.

The reasons Green feels blessed run parallel to the reasons he wrote the book in the first place. He was inspired by his early work as a children’s chaplain at a hospital and his friendship with one of his fans – 16-year-old Esther Earl, who died of thyroid cancer almost four years ago. When the novel was published in January 2012, “The Fault in Our Stars” was a decade in the making. He often worried that the subject matter would be too dark, especially for a young-adult audience.

“I couldn’t imagine that anyone would want to read it,” he said. “But I just needed to write it.”

And people read it – over and over, telling their family and friends they needed to read it, too. As depressing as the subject matter may be, Green punctuates the book with humor and a remarkable ability to imitate the deadpan, innocent, authentic voice of a teenager. Hazel might have a serious illness that affects her every waking moment, but she’s still a 16-year-old girl: She likes reality TV – particularly “America’s Next Top Model” – and reading books and meeting cute boys.

Hazel, who almost died at age 13 until she was saved by a “miracle” drug, is forced to attend Support Group by her parents, played by Laura Dern and Sam Trammell. While there, she meets the dreamy Augustus “Gus” Waters, an 18-year-old boy who lost his leg to osteosarcoma, and who takes her by surprise with his charm and lack of pretension. For example, why is he staring at her? As Gus says in the book, “I enjoy looking at beautiful people, and I decided a while ago not to deny myself the simpler pleasures of existence.”

With some tweaks, much of the movie – directed by Josh Boone – resembles the book in tone and plot. Hazel and Augustus bond quickly and deeply, as their respective views of the world are shaped by what they have been through with their illnesses.

Mostly, though, they just fall in love. The Pittsburgh filming location doubles for Indianapolis, where Hazel and Gus live. (It’s also Green’s home town.) Thanks to Gus’s “wish” from a “Make-A-Wish”-like foundation, they travel to Amsterdam to meet Hazel’s idol, author Peter Van Houten, a cantankerous alcoholic portrayed by Willem Dafoe. Van Houten wrote a book about a girl with cancer that essentially has become Hazel’s bible, and she’s determined to get answers about the story’s mysterious end.

No spoilers, although fans of the book know all too well how things progress from there. Green was on set almost every day – where, incidentally, he says he cried almost every day – and chronicled the experience across social media. He’s very pleased with the way the film turned out, especially the screenplay by Scott Neustadter and Michael H. Weber; the duo wrote 2013 drama “The Spectacular Now,” also starring Woodley.

In the weeks leading up to the film’s opening, devoted young fans have been tweeting about their excitement, and waiting faithfully in line with their parents for 24 hours or longer to see special preview screenings. It’s worth asking: People spend lots of time trying to crack the code of connecting to teens, so how does Green achieve this feat so effortlessly? He does so in his books, as well as with his funny, informative hit YouTube series Vlogbrothers, which he runs with his brother, Hank Green.

“I think when old people try to be hip and cool it’s just the worst. . . . Whenever they try to come up with a social media plan that ‘young people will respond to!’ it gives me the shivers,” said Green, who’s 36 and married with two children. “I think the key to being relatable to teenagers is talking to them as if they were human beings instead of as if they’re cool teens or something. If you’re open and authentic with teenagers they tend to respond pretty respectfully and really intelligently.”

“There’s nothing particularly hip about ‘The Fault in Our Stars,'” he said. “But I think what teens respond to is the unironized emotion and the experience of falling in love and grappling with loss and trying to answer those big questions about meaning.”

The love story aspect of the book is a big reason why teens start pondering these deep issues. Even though it’s obvious from the book’s description that this isn’t going to be a love story with a happy ending, young people are fascinated by this particular star-crossed romance. As Green acknowledges, that age is really the first time you’re reconciling yourself to “the permanence of death, the ubiquity of it, the fact that just not just every person is going to die, but the species itself will cease to exist.”

And in the end, Green says, the great tonic to it all, and the reason we can tolerate thinking about it, is love.

“Love is a great source of hope for us – not just romantic love,” he said. “But the love between parents and children, and the love between friends. It’s a way to grapple with that stuff not hopelessly.”

“The Fault in Our Stars” (PG-13.) At area theaters. Contains thematic elements, some sexuality and brief profanity.