Facebook and Twitter are beginning to take on hairy issues like election meddling and harassment. But fixing those problems won't be easy.

The social media giants have successfully signed up nearly half the world's population to their services, a total so large that growth rates were starting to slow naturally. Now, harassment and abuse on those platforms are taking their toll. Some users are fleeing and stock prices have dropped.

Social media is facing the music.

The problems came into focus last Wednesday when Facebook announced that daily active user counts had fallen from 282 million to 279 million in Europe. The social network also indicated it was no longer growing in the US and Canada, two of the most lucrative advertising markets. The sliding user growth came as Facebook worked through its second year of nonstop scandal over unchecked political meddling and data misuse, highlighting the days of easy and consistent growth were ending.

And it wasn't just Facebook. Two days later, Twitter said it too was seeing user counts drop, to 335 million people who log in each month from 336 million just three months earlier, in part because of its efforts to improve "the long-term health of the platform."

Now playing: Watch this: Trump slams 'shadow banning' on Twitter: What even is...

The numbers gave Wall Street, the one part of our society that hasn't expressed about social media, a reason to worry.

"We're investing so much in security that it will significantly impact our profitability," Facebook CEO Mark Zuckerberg said on a Wednesday conference call. "This is a critical year for Facebook."

And maybe beyond this year, given the demands of these platforms to police themselves. On Tuesday, Facebook said it had identified a coordinated effort on its main service and on Instagram to interfere in the US midterm elections. The behavior included posts similar to some that have been identified as Russian efforts to interfere with 2016 election, as well as 30 real-world protests, organized by the fake pages.

"We're still in the very early stages of the investigation and don't have all the facts," Facebook COO Sheryl Sandberg said on a conference call with reporters. "We don't have perfect information."

Separately, Twitter said on Monday efforts foster "healthy conversation" based on "openness and civility."

"We don't think that this work will necessarily ever be done," Twitter CEO Jack Dorsey said last week. "It doesn't have an endpoint."

Still, Wall Street has clearly been rattled. Facebook last Thursday suffered the worst market value drop ever for a public company in the US, slumping by $120 billion. Last Friday, Twitter watched its value sink 20 percent after releasing its earnings results. Shares of both companies have since leveled out, hovering just below where they'd fallen to last week.

Uncertain future

While it's easy to diagnose the problem, it's much harder to find a cure. And it's only in the past year or so that Facebook and Twitter have begun to meaningfully address concerns about their respective services.

Zuckerberg in particular was publicly dismissive after the 2016 US presidential election that hoaxes and false news stories had impacted voting trends. Then he was slow to address concerns about abuse and harassment campaigns by some Facebook users, most recently the popular conspiracy theorist Alex Jones. And Facebook has been blamed as well for not watching its service closely enough to stop the spread of misinformation that led to violence in other countries.

By the time Zuckerberg was invited to Capitol Hill in April to answer questions from three congressional committees over two days and a combined 10 hours of testimony, he was contrite.

"We didn't take a broad enough view of our responsibility, and that was a big mistake. And it was my mistake. And I'm sorry," he said when speaking to members of the Senate Judiciary Committee and Senate Commerce Committee. "I started Facebook, I run it, and I'm responsible for what happens here."

For Twitter, the problems have been even more pronounced. Hate mobs have used the service to coordinate campaigns against politicians, activists and victims of mass shootings. President Donald Trump has used Twitter to make some of his most controversial statements, ranging from threats against other countries to personal insults against women's looks.

Twitter's response after waves of pointed criticism has been to focus on the idea of fostering "healthy" conversations on its service while stepping up enforcement of its rules.

"We believe that Twitter's value as a daily service is enhanced when the conversation on the platform is healthier and people feel safe freely expressing themselves," Dorsey said Friday. "We are making progress."

Now the companies will have to convince investors of that, too.

First published July 27 at 8:20 a.m. PT.

Update July 27 at 2:18 p.m. PT: Adds additional details about some people's criticism of Twitter and Facebook.

Update July 31 at 12:46 p.m. PT: Adds details of Facebook identifying more bad behavior and election meddling.

Cambridge Analytica: Everything you need to know about Facebook's data mining scandal.

iHate: CNET looks at how intolerance is taking over the internet.