On the night of the U.S. presidential election, Dipayan Ghosh, a privacy analyst at Facebook, sat in the headquarters of what was to be the Hillary Clinton victory party, watching the election results roll in.
Mr. Ghosh, an engineer who had previously been a policy analyst in the Obama administration, had been working at Facebook for little more than a year, focusing on U.S. privacy issues and consulting with the Clinton campaign on technology issues.
It had been a rocky year for the company. It had been hit by a series of public-relations scandals. There were the allegations that the moderators who ran its Trending Topics News Feed were biased against conservative news sources and points of view. Then came reports that Macedonian teenagers had been gaming Facebook's platform to drive millions of Americans to websites pumping out fake news about the election, much of it favouring Donald Trump.
"Sitting there on election night … was striking for me," Mr. Ghosh says now. "It put all of these events and the role play between social media and national politics in high resolution."
He left Facebook a few months after Mr. Trump was elected, disillusioned by what he saw as a co-ordinated campaign of political disinformation on social media that had played a role in the election. He is now a fellow at New America, a think tank whose major donors include several tech billionaires.
Earlier this year, in a paper co-authored with New America senior adviser Ben Scott, Mr. Ghosh began sounding the alarm about how the technology that has enabled platforms such as Facebook to earn huge profits helping companies sell yoga pants and home meal kits to an online audience of billions could also be used by political actors to undermine democracy.
As the indictment handed down last month by U.S. special counsel Robert Mueller against more than a dozen Russian nationals has made clear, Facebook was the main target of an online campaign by foreign agents to sow discord during the presidential election.
Revelations about Russian interference have seemingly sparked a reckoning within Facebook itself. The company's 33-year-old founder and chief executive, Mark Zuckerberg, made it his goal for 2018 to fix Facebook's issues. He is working with chief operating officer Sheryl Sandberg, who has led the company's tightly controlled public relations campaign in the aftermath of the 2016 election.
The company has announced changes to its News Feed aimed at reducing third-party content and encouraging users to have "meaningful social interactions." It has pledged to bring more accountability to political advertisements and has been testing new ad transparency features across Canada since last fall.
"We should have been faster at spotting the bad actors and the abuses on the platform and we should have acted sooner," said Kevin Chan, Facebook's head of public policy for Canada. "That is clear, and we've said it – and I don't think you can say it enough."
The political brouhaha has landed atop long-standing concerns of regulators and users about the extent to which Facebook and other social media companies encourage users to give up their privacy. Such companies harvest users' personal data – hobbies, interests, friends, political beliefs – so advertisers can better target them. Last year, Facebook earned almost US$40-billion in revenue, virtually all of it from advertising.
Lurching from crisis to crisis has led Facebook into an existential one: To a growing array of critics, Facebook is a media company and should be regulated as such. For its part, Facebook wants to be viewed differently – as a platform – free of the regulations and responsibilities of traditional outlets such as newspapers and broadcasters.
Which is it? If it can't answer that question to the satisfaction of its critics, regulators will, as they're now doing in Europe with new privacy legislation.
"We're definitely playing catch-up and we acknowledge that," Ms. Sandberg told a San Francisco technology conference this month, adding, "We take responsibility for the content on Facebook."
For all the talk about transparency, however, the company's top executives have been tight-lipped when it comes to mainstream media. Instead, they have mounted a charm offensive largely through public posts on Facebook, controlled public appearances and interviews with select outlets. Requests for interviews with Ms. Sandberg were declined. And what they've said so far has done little to silence critics.
Former Facebook executives, including its first president, Sean Parker, have expressed regret for their roles in building such a globally influential platform. Early investor Roger McNamee has called on Facebook to make sweeping changes, including scrapping its advertising model for a subscription-based business. Hedge fund billionaire George Soros, who once owned more than 2.5 million shares in the company, dumped his remaining Facebook stock this year. The Silicon Valley tech giant's "days are numbered," he told the World Economic Forum in Davos, Switzerland, this year. "Regulation and taxation will be their undoing."
Many analysts, including Mr. Ghosh, believe the problems aren't limited to Russian actors churning out divisive content over social media. They are instead deeply intertwined with the digital-advertising industry, which has turned companies such as Facebook into global information superpowers.
A company that was started in a dorm room to connect students at U.S. colleges, Facebook has become the world's largest social network, connecting more than two billion people around the world.
In recent years, it has grown into a digital conglomerate that competes aggressively in a variety of sectors, from photo sharing to video streaming to workplace collaboration tools. One out of every six minutes online is spent browsing Facebook.
And despite adamantly denying that it is a media company, it has become the place where roughly 40 per cent of Canadians and Americans go to get their daily news.
That is increasingly pitting the company against lawmakers in several countries, who want Facebook and other social-media giants to take on more liability for the content posted on their platforms – or face sanctions.
But is it even possible for such an enormous, momentum-filled entity to change course, pause or even fix itself?
"Facebook is an amazing company," Mr. Ghosh says. "But I think all of us who worked there struggled to really influence the machine."
Now that Facebook is a global advertising behemoth, it's easy to forget that the company once eschewed the idea of a business model entirely reliant on advertising – or that it should worry about its business model at all.
"I always read these articles that are like, 'OK, you guys must be doing this because it's going to make you more money,' " Mr. Zuckerberg told reporters in 2010. "And honestly, for people inside the company, that could not ring less true."
For much of the company's early life, it focused mainly on growing its user base. It outsourced early ad efforts to Microsoft, which signed a 2007 deal to provide banner ads on Facebook. It dabbled in other revenue-generating projects such as virtual gifts, video games, online classified ads and its own digital payment system.
But its business model eventually coalesced around advertising, particularly after Mr. Zuckerberg hired Ms. Sandberg in 2008. She had led Google's hugely successful online ads program and had relationships with major advertisers, as well as lawmakers from her time as chief of staff to former U.S. treasury secretary Lawrence Summers.
In 2012, under mounting pressure from investors and employees ahead of Facebook's IPO, Mr. Zuckerberg finally allowed advertising on Facebook's News Feed, which has since grown to be the company's most lucrative source of revenue.
As Facebook has grown, it has become even more reliant on advertising, which brought in 98 per cent of its revenues last year, up from 84 per cent in 2012.
What has made Facebook such a powerful marketing tool is that its platform brings together both scale and targeting, two highly sought-after qualities for advertisers that have traditionally been almost impossible to combine, New York University marketing professor Scott Galloway writes in his influential 2017 book The Four: The Hidden DNA of Amazon, Apple, Facebook and Google.
On one hand, advertisers can potentially reach a massive audience of billions worldwide on Facebook; on the other, they can zero in on a small segment of that population with remarkable precision.
Among Facebook's most important advertising tools is its "custom audience" feature, which allows advertisers to upload information about their existing customers and match it to Facebook profiles. Advertisers can then use the "lookalike" feature to identify potential new customers whose Facebook profiles share similar attributes.
The company uses an auction system to price ads that is based not just on how much advertisers are willing to pay to reach a certain number of users but how relevant and engaging an ad might be compared with other ads and content vying for the same target audience.
Such cost-effective ad technology is among the reasons why some analysts say Russian trolls were able to spend a relatively small sum – roughly US$100,000 – to reach 126 million Americans, almost as many people as voted in the 2016 election.
While it was ramping up its advertising efforts, Facebook was also actively courting publishers to create more content for the platform. Mr. Zuckerberg unveiled a new design for its news feed in 2013 that he promised would give users "the best personalized newspaper in the world."
The company wooed major media brands such as The New York Times to post articles and videos directly on its site through its Instant Articles and Facebook Live features, giving struggling media outlets a badly needed opportunity to earn new digital revenues. It began posting "trending" news stories and launched a short-lived app called Paper, hiring teams of editors to curate content for both efforts.
Even as it was working to attract recognized media outlets, the outreach efforts also became a crucial platform for smaller blogs and news outlets, many of which relied almost exclusively on Facebook for their traffic and revenue.
While those efforts included plenty of legitimate small publications, they also enabled fake news websites to cultivate huge audiences by pumping out political hoaxes.
The two features – ads and published content – exist in a virtuous cycle, says Mr. Scott of New America. The more users engage with polarizing political content, the more Facebook's algorithms will show them such content, driving them deeper into a political bubble. That also helps keep users on the platform longer, where they are exposed to even more advertising.
"It's not really about the Russians," says Mr. Scott, who lives in Toronto. "It's the way in which the Russians took advantage of this underlying vulnerability. Yes, it's built into the ad tech, but it's rooted in the way these platforms identify and segment audiences and feed them particular types of content."
It was a model intended to make the world "open and connected," as Mr. Zuckerberg had long promised. But, as it turns out, it can also divide people and obscure the truth.
In the past year, consumer brand conglomerates Procter & Gamble and Unilever, which are among the world's largest advertisers, have begun pressuring social-media firms to clean up fake news and offensive content.
More threatening for companies such as Facebook, however, is that some major advertisers are starting to cut their digital advertising budgets. Procter & Gamble slashed its spending with major digital advertising players last year by US$200-million, shifting it toward television, e-commerce platforms and streaming services.
After pressing digital media companies for more data about their ads, P&G said it realized the average viewing time for an ad on a mobile news feed was less than two seconds.
"It's shocking when you first learn of it," says Brian Wieser, an analyst with Pivotal Research Group, of the short viewing time of most Facebook ads. "The reality is that most marketers aren't aware." Mr. Wieser has had a "sell rating" on Facebook stock since last summer.
Major brands have similarly been pressing social-media companies to allow their advertising metrics to be audited by the Media Rating Council, an independent measurement watchdog. (Facebook has agreed.)
The ad industry's push for more transparency and the problems with Russian political interference are related, Mr. Wieser says: Both point to the inability of social-media firms to reliably monitor what is happening on their platforms.
Similarly, some news organizations have begun pushing back against what they see as a lopsided financial partnership with Facebook. While social-networking companies have driven large volumes of traffic to media outlets, publishers have struggled to make significant money from online platforms. Facebook and Google represented just 5 per cent of the total average digital revenue for media companies in the first half of last year, according to Digital Content Next, a trade association representing more than 70 major U.S. television and print-media companies.
"The striking data point is that there's just really not a lot of revenue coming through for all the work that's being done and all the effort from the news industry," said the association's chief executive, Jason Kint.
Brazil's largest daily newspaper, Folha S. Paulo, said it would stop posting stories on Facebook because changes to its News Feed have hurt publishers. Facebook was already a declining source of traffic, the paper said, accusing the Silicon Valley firm of trying to co-opt publishers into its Instant Articles program, which required media outlets to publish paywall-free articles directly on Facebook in exchange for faster load times and the chance to earn ad revenue.
More than half the major media outlets who originally partnered with Facebook on Instant Articles in 2015 appear to have abandoned the platform, according to a one-day analysis by Columbia University's Tow Center for Digital Journalism.
While publishers once looked to online platforms as places where they could launch new products and build new revenue streams, that view is now shifting – as is the value proposition, Mr. Kint says. "Publishers are starting to look at Facebook as a marketing tool, as a way to drive traffic back to their content and brand. They have to treat it like any other marketing vehicle, with that same sort of financial scrutiny."
Former Washington Post publisher Donald Graham believes Mr. Zuckerberg is sincere in his efforts to tackle Facebook's problems. (He also says the smartest publishers will continue to invest in relationships with social media companies to find ways to best use their platforms.)
"Mark has learned as much as anybody I've ever known," says Mr. Graham, who first met Mr. Zuckerberg in 2005 and spent almost six years on Facebook's board.
"I don't know what Mark is thinking of doing," he said in an interview. "But I would bet you that it will be different than people expect."
Social-media companies know that fixing issues that might be angering their users is in their best interest, he said. "If Facebook doesn't and Google doesn't and Apple doesn't and Amazon doesn't address the issues that users are unhappy about, they know what a lot of people don't, which is that in the long term it is uncertain whether they'll remain in business at all."
Still, even Silicon Valley is growing skeptical that it will be able to solve its own problems without government intervention.
Salesforce CEO Marc Benioff has warned that technology needs to be regulated like big tobacco. "We're the same as any other industry," he told CNBC this year. "The government is going to have to be involved."
Some of that regulatory pressure might come from Canada.
In an interview, Minister of Democratic Institutions Karina Gould called Facebook's political ad transparency changes "good initial steps," but said the Canadian government still needs to see more proof that social media platforms can fix the problem of foreign political interference ahead of next year's federal election. The government is looking to social media companies to change their internal algorithms to prove they can better detect and tag political ads, Ms. Gould said.
Ottawa is also concerned that the complex advertising auctions that companies such as Facebook use to price political ads may not conform to Canadian election law requirements that media companies charge the same ad rates to all political campaigns.
Ms. Gould has been having informal conversations with Canadian officials from social media companies, including Facebook, but said the companies have so far been reluctant to take responsibility for the problems on their platforms.
"How they define themselves is as a platform on which information is shared, but not as the publisher or arbiter of information," she said. "I would argue that because of the algorithms that they have, that they are actually becoming the arbiters of where and how Canadians consume information."
As for what Canadian regulators might do if Facebook and others don't make substantive changes, Ms. Gould is watching some of the planned new laws in Europe, where she travelled last fall.
"One of the key things I saw when I was in Europe is that social media companies only responded when regulation came down from government," she says.
Facebook's Mr. Chan said the federal government has not made any specific requests of Facebook. But he said the company is already making efforts to address lawmakers' concerns, including launching cybersecurity and digital literacy campaigns in Canada. The company is also using machine learning and artificial intelligence to spot and remove fake accounts and to tackle clickbait, including "spoof" accounts that mimic legitimate news sites.
The cornerstone of Facebook's efforts to target divisive ads is a feature called View Ads, which the company has been testing only in Canada since the fall. It allows the public to see all the ads that any Facebook page is running across the platform, not just those that have been targeted to them. The feature, which it expects to expand to the United States ahead of the November midterm elections, is meant to address criticisms that Russian trolls were able to post ads on Facebook with vastly different messages for supporters of Mr. Trump, Ms. Clinton and Democratic leadership contender Bernie Sanders.
"We are not waiting for regulation," Mr. Chan said. "We have taken the criticism of people, not just in Canada, but around the world. We have taken a hard look at how our platform works, what are the systems that need to be in place to address the abuses that happened, and we are taking action."
The most important new law Facebook will have to deal with is the European Union's General Data Protection Regulation, which takes effect in May. The policy involves a complex set of rules that put limits on what companies can do with the personal data they collect and requires that they ask users for permission to use their data for a previously undisclosed purpose.
While analysts who have studied the new rules say the implications for Facebook are not yet clear, the company's chief financial officer, David Wehner, told an investor conference last month that Facebook could see its number of daily users in Europe decline as a result.
Facebook has already opted not to roll out new advertising features on its WhatsApp messaging service in Europe because of ongoing regulatory concerns about how the company shares personal data between WhatsApp and its main Facebook platform.
Even so, there may be limits to how far non-U.S. lawmakers want to push back against social media companies who represent potential foreign investment opportunities and jobs. In meetings at Facebook offices last year, Canadian government officials made it clear that their top priority was to convince the company to build a data centre in Canada; the officials went so far as to write it on a wall that Mr. Zuckerberg had set up to encourage employees to scrawl their thoughts, according to a person who was present for the meeting.
Mr. Graham, the former Washington Post publisher, also warns that regulation has often been co-opted for political gains, pointing to the Nixon administration's efforts to stop the Washington Post from renewing broadcast licences during its coverage of the Watergate scandal.
Newspapers and other traditional media outlets have also had to walk a similarly fine line on whether to publish sensational and polarizing political content, efforts that are protected in the U.S. by free speech laws.
"You wouldn't print an ad that broke the law or that would encourage people to break the law," he says. "But would you print an ad putting forward points of view you knew to be false? In many cases, I would say the right answer to that is yes."
U.S. voters will get an opportunity soon enough to see whether Facebook's changes will succeed in preventing a repeat of the 2016 election. The congressional midterm elections will offer a test of the public's support for Mr. Trump's presidency – and for the social-media companies that have fuelled so much political angst.
"I see no reason not to expect an arms race where everybody who can tries to use these tools to maximum effect," Mr. Scott says. "And that means a lot more outrageous content and a lot more pressure on the companies when these stories start to appear."