When it comes to business today, understanding the value of social media is essential.

That message was even clearer last week in Jen Scheffer's marketing and business classes when New York Time bestselling business author Chris Brogan came to talk to the students.

Brogan is a blogger and bestselling author documenting ways technology and social media can help business and improve productivity. He has appeared on the Dr. Phil television show and interviewed some of the most successful business leaders in the wold, including Richard Branson and Disney chairman and CEO Robert Iger.

However, it may be how he came to speak at Pinkerton Academy that shows the true power of social media applications.

Scheffer said one of her senior students, Rebecca Gray, was reading the Twitter feed for the American Marketing Association when she found out about an event in Boston that she wanted to attend.

At the event, Gray and fellow senior Kayla Wood saw a presentation by Brogan on social media, and after the event, they contacted him via Twitter.

"He was very approachable and helpful," said Gray.

Soon enough, Scheffer was also in touch with Brogan to see if he would want to be a guest speaker for her class through a Skype session.

"We sent a tweet to Chris asking him if he was interested in Skyping with a high school group in New Hampshire," said Scheffer.

When Brogan, who lives in Maine, found out Pinkerton Academy was only about an hour away from his home, he said he would be happy to come down and talk to the students in person.

Brogan spoke about how his interest in social media and the Internet dates back to his high school days in Maine, when he found himself interested in things that didn't interest his peers. As he grew older and the Internet grew in popularity, Brogan said he discovered he could find groups of like-minded people who didn't have to live in the same geographic region.

"Everyone wanted to talk about Red Sox and muscle cars, and I wanted to talk about super heroes and Dungeons and Dragons, so there was a good chance I was going to get punched every day," Brogan said. "I was able to use these online things to talk about what I was interested in and find people like me."

Brogan said he started a blog that began to find success after he started writing about how people could use technology to improve their businesses, customer service and productivity. Soon, Brogan was an in-demand public speaker and consultant for a number of big companies.

While Brogan has found success in the world of business, he told the students it is important to focus on the things they are passionate about.

"There are opportunities for you in so many ways to express what you want to talk about and what you want to do," he said. "You should probably have bigger dreams than that cubicle gig."