It’s not altogether surprising that Drew Taggart wrote a song lampooning people who live their lives via text message and who aren’t sure if they’ve been somewhere unless they take a selfie to prove it.

As a dance music deejay based in New York City, the 2008 graduate of Freeport High School sees those people all the time. But the way Taggart’s song “#Selfie” became a hit would have been impossible to imagine a few years ago. It was marketed to the very people it parodied, and those people gave it a listen largely because a new class of social media stars – known as “influencers” – told them to.

“#Selfie” was released in late January and put The Chainsmokers, the electronic deejay duo featuring 24-year-old Taggart and Alex Pall, at No. 1 on Billboard’s dance/electronic music chart. The song also climbed to No. 16 on the singles chart. The video, featuring celebrity selfies and the nonstop chattering of a self-absorbed young woman in a dance club bathroom, had been viewed on YouTube about 200 million times by late summer.

One of the influencers used to promote the song and video was Nash Grier, a 16-year-old high school student from North Carolina who reaches an estimated 14 million people with his posts on Vine, Instagram, Twitter and YouTube.

“The day (Grier) tweeted the video, we couldn’t use Twitter for days, it was really insane,” Taggart said. “It was basically this funny idea about all this stupid (stuff) we hear all the time.”

It was a funny idea, all right, but marketed in a way that capitalized on pop culture trends increasingly controlled by young people with lightning-fast Twitter fingers.

The success of “#Selfie” allowed Pall and Taggart to sign a seven-figure record deal, appear on national TV shows like “American Idol” and sell out 2,000-capacity venues around the world. In August, the duo released another song and video, “Kanye,” a Cinderella story of sorts about a young girl dreaming about the kind of life that celebrities lead.

The pair also has landed a gig hosting a show on Sirius XM radio called “Nice Hair with The Chainsmokers,” which features new music and interviews.

Though Taggart’s success has a lot to do with new opportunities presented by social media, friends and family say he’s always been one to take paths other people might miss.

While in high school, he persuaded his parents to let him spend a semester in Argentina, where he first discovered his passion for electronic dance music. And when he and his Freeport High School classmates were permitted to do an independent study senior project, he used the time to teach himself how to make music on a computer. It’s a skill he continues to use and develop.

ANATOMY OF A PARODY

Last year at this time, Taggart and Pall were working on their electronic music and deejaying at clubs and events. But they hadn’t come close to a hit record. They worked at creating electronic music, either for their own performances or for use by other bands.

They were preparing to play a club in Miami when they got the idea to promote the date with a funny song, to be posted online. The song became “#Selfie.”

Taggart and Pall first posted the song online for free, using various social media platforms. Then they met Oliver Luckett, chief executive of the social media marketing firm The Audience. Luckett said he knew the song would be a hit as soon as The Chainsmokers played it for him last year. The fact that people who go to clubs and take selfies love the song doesn’t surprise him.

“It was funny, catchy and a guaranteed hit for its sheer ridiculousness,” Luckett wrote in an email, responding to questions about Taggart. “Self-deprecation is relatable because we all have the ability to be a bit ridiculous and make fun of ourselves.”

Luckett connected The Chainsmokers with Steve Aoki, an electronic music producer and founder of Dim Mak Records. The song “#Selfie” was officially released in January, along with a video (in which The Chainsmokers wear cleverly profane T-shirts) showing a woman dressed for a night on the town as she looks into a nightclub bathroom mirror, talking to a friend.

Her verbal meanderings include: “Did you think that girl was pretty? How did that girl even get in here? Did you see her? She’s so short and that dress is so tacky. Who wears cheetah? It’s not even summer, why does the deejay keep on playing ‘Summertime Sadness’? After we go to the bathroom can we go smoke a cigarette? I really need one. But first, let me take a selfie.”

The video took full advantage of the social media culture the song was lampooning.

It featured selfies by celebrities, including rapper Snoop Dogg, actor David Hasselhoff, wrestling star Tyler Breeze and others. The club girls in the video are actresses, but the pointed lyrics are read perfectly by a friend of Taggart and Pall, Alexis Killacam, who is not a performer. It also included about 30 “influencers” – people who have sizable social media followings, like Grier, who reportedly gets paid as much as $100,000 to plug things via social media.

“It’s interesting to me to see the reaction we get,” Taggart said of the success of “#Selfie.” “Some people don’t get that it’s a parody, and they hate it. But others like the beat. It’s a parody with kind of a funky beat, so it’s a perfect middle ground.”

FINDING THE BEAT AT AGE 5

Taggart’s mother, Laura Girr, worked until recently as the technology integrator at Freeport High School. His father, Mark Taggart, makes prosthetic limbs and orthotics.

When Drew Taggart was just 5, he asked his parents for a drum set. His mother said she considered a toy set, but a store clerk convinced her that the real drums would last longer, even if young Drew only used them as a toy.

But there was something about Taggart even then that convinced his mother he was serious about learning the drums.

“He’s always been very determined,” she said.

Taggart played drums through childhood and eventually took lessons from Reed Chambers, now the drummer for the Portland-based Jason Spooner Band.

“He just walked in, at 12, and had this larger than life personality,” said Chambers, who has kept in touch with Taggart. “He’s just a born entertainer. The mastery in deejaying is in the collage, in knowing how to make the right mix for the room. He’s always been smart about that.”

Chambers said Taggart’s energy and enthusiasm were visible, literally, when he played or talked about music.

“He was one of those guys always tapping his hands, playing drums on anything,” Chambers said. “He was like a border collie with a ball, always fired up.”

Taggart’s parents weren’t surprised when he asked to spend part of the school year studying in Argentina. He spent the spring semester of his junior year there.

“His whole thing about going to Argentina was ‘Why spend four years in one high school when there’s so much else going on in the world?’ ” Girr said. “And it opened up all kinds of doors for him.”

The most important doors, in terms of Taggart’s future, were to the dance clubs he visited in Argentina with other young people. Those clubs introduced him to the world of electronic dance music. When he got back to Freeport High, he created his own electronic dance tracks on a computer for his senior project.

Taggart applied to a music business program at Syracuse University. In college, he got an internship at Interscope Records. When staff there found out he made electronic music, they had him produce music for potential use on other artists’ recordings.

In 2011, calling himself D’Anconia, Taggart released an EP of his original electronic music.

After college he was living at home in Freeport, for a while, when a friend of a friend introduced him to Pall, who was deejaying in New York City. Taggart moved to New York, teamed with Pall and began working at clubs all over the city and beyond.

A DOSE OF #SELFIE CONFIDENCE

As The Chainsmokers, Taggart and Pall toured the U.S., did work for indie bands and were doing all right for themselves. Then “#Selfie” hit the charts.

“We were on ‘American Idol’ and we were taking selfies with the audience. It was corny, whatever, but maybe we reached some people who had never heard dance music before,” said Taggart. “In Asia, we’re like One Direction – we need security guards. It was really insane there.”

But there has been backlash to “#Selfie” as well. Taggart says there are “elitist” elements in the dance music community, and those elements have decried The Chainsmokers as sellouts for going on a mainstream show like “American Idol.”

“There have been people just ripping us to shreds on Twitter, just hating on us,” Taggart said. “But after we did ‘American Idol’ our Twitter and Instagram grew quicker in two weeks than at any time in our careers.”

Taggart says he’s “obsessed with pop culture,” so it makes sense that The Chainsmokers’ most recent single, “Kanye,” focuses on celebrity lifestyles and society’s fixation on them. But instead of poking fun at someone, this song takes a more emotional approach to the wishes and dreams of ordinary people who imagine a better life.

The lyrics, sung by the pop group Siren, are about how a young woman catches herself dreaming about being able to live like celebrities, to do whatever she’d like to do, the way rapper Kanye West and other omnipresent celebrities seem to do:

“One day I’ll stand with a crown on my head / Like a god yeah, like a god / With every step, no, I won’t second-guess what I want/ I wanna be like Kanye / I’ll be the king of me always.”

“This is sort of niche for us, the social content in songs,” Taggart said. “I want to make an album, but right now it’s hard to get people to listen to an album, there’s so much content out there. So singles are the smart way to go.”

Taggart said he and Pall are focusing on designing their live shows, building sets and making them as visually appealing as they can. One of his immediate goals is to have his parents see him perform at a major electronic music festival. During the last weekend of September, The Chainsmokers performed at TomorrowWorld, an electronic music festival outside Atlanta that last year attracted more than 140,000 people. Taggart’s mother has seen her son perform in New York City and at a show at Bates College in Lewiston.

“I’ve seen him, but going to those shows is not my thing. It’s super hot, really loud and usually late at night,” Girr said. “But when I did go, it was wonderful to watch him in his element.”