In September two young women approached Hawkers, a Spanish sunglasses brand, with an unusual proposition: If the company paid for each of them to get the iPhone 7, they’d help hijack the hype on the phone’s first day on sale at the giant Apple store in Madrid’s Puerta del Sol. Their idea was to get there early enough to be first in line, then let Hawkers promote their wait to generate almost-free publicity. It may sound dumb, but it worked.

The women waited in line for 38 hours. While they stood there, Hawkers amped up the stunt by hiring them a masseuse and a violinist, plus a professional Instagrammer to document everything. The brand launched an online raffle to give away one of the iPhones, promoting it repeatedly to more than 4 million fans on Facebook and 174,000 followers on Twitter. Participants had to fill out an online form and tweet a video and a hashtag. Some 6,000 submitted, and the promotion became a top trending topic inside and outside Spain. Hawkers says about 30 million people saw it on Twitter and Facebook. Each.

“If you can do it in a creative way, you don’t need lots of money to spread the word,” says David Moreno, co-founder and creative director of Saldum Ventures, Hawkers’ Spanish parent company. “We can hack a famous brand, or we can hack the whole system.” The iPhone stunt fit the formula he’s used to sell about 3.5 million pairs of sunglasses in three years: Use big brands and celebrities to make a lot of noise on the cheap, amplify it on social media, then invest heavily in targeting online ads at the crowd that gathers. This spring the startup bought a rival that has sold an additional 500,000 pairs.

Other ventures included a video of a phony yeti sighting in the Pyrenees that made headlines around the world in February, helping to promote a ski resort, and its sponsorship of the Los Angeles Lakers last year. Saldum attracted local attention as the first Spanish company to sponsor an NBA team, and it maintains its support primarily for daily Hawkers mentions on the Lakers’ social media feeds.

Saldum, which has three other sunglasses lines, sold €40 million ($44 million) in shades last year and expects to move €70 million this year, with about 60 percent of sales from Facebook. Moreno says the projection for next year is €150 million. Facebook, Twitter, and the e-commerce platform Shopify have used the company as a case study when convincing others of the value of their platforms.

In early October, Saldum said investors had paid €50 million for a minority stake in the 120-employee company. Moreno wouldn’t disclose the valuation, but Spanish media estimate it at €200 million to €250 million. Moreno says he’ll use the funding to reach more online shoppers outside Spain, who make up about one-third of sales, and experiment more with selling offline.

Abroad, Moreno will have more competition. With the global sunglasses market topping $18 billion, dozens of startups are selling their own low-cost brands online, says Adam Moyer, a former art student who in 2005 launched one of the first such companies, Knockaround, in San Diego. Knockaround sells hundreds of thousands of pairs of sunglasses online each year and turns a profit, says Moyer, who previously used Saldum’s founders as distributors in Spain. Fast-fashion brands such as H&M and Zara are also pushing into the market, says Jasmine Seng, an analyst at researcher Euromonitor International.

The Hawkers strategy won’t change too much, Moreno says. Last year he spent more than half his €6 million digital ad budget to put thousands of different ads on Facebook; this summer alone, sometimes €40,000 a day. Andreas Klein, Saldum’s head of international sales, says the team constantly monitors each ad’s effectiveness and swaps out photos and copy that don’t attract clicks. Moreno says he’s not worried about social media imitators, because Facebook’s ad tools are like an artist’s pencil: What a merchant can get from them, he says, “depends if you’re Picasso or you’re me.”

The bottom line: Saldum has sold 3.5 million pairs of sunglasses in three years with guerrilla marketing and heavy promotion on social media.