There’s a lot of talk in journalism circles these days about social media rules.

What kind of things, exactly, are journalists allowed to tweet or post on Facebook without running afoul of their newsrooms’ policies?

Is it okay to tweet about racial justice? Press rights? Can an ill-considered tweet be a disciplinary offense? Could it actually get you fired?

Shouldn’t journalists be able to say what they think, especially when social justice is concerned?

I hear a lot of talk about making such policies clearer, and that’s undoubtedly a good idea.

But I don’t think any kind of newsroom policy can address what just happened to Emily Wilder, an entry-level journalist in Arizona whom the Associated Press abruptly fired this month after only three weeks on the job — and, conspicuously, just as an online right-wing mob was calling for her head.

The AP says it fired the recent Stanford University graduate for violating its social media policy while she worked there, though the news agency won’t say exactly which of Wilder’s posts was the problem. The 22-year-old’s most memorable tweet criticized news organizations, generally, for the language they use to describe the Middle East conflict — which is not exactly a radical idea. “Using ‘israel’ but never ‘palestine,’ or ‘war’ but not ‘siege and occupation’ are political choices,” she wrote, “yet media make those exact choices all the time without being flagged as biased.”

It’s pretty obvious to me that her recent social media posts were not really at the heart of her dismissal.

Wilder, who is Jewish, was fired because she had a history of outspoken college activism on a particularly touchy subject.

And because a right-wing mob came for her at a particularly touchy moment.

The swarming began with the Stanford College Republicans, who posted a Twitter thread on May 17 about Wilder’s pro-Palestinian activism while she was a student there, and ridiculously claimed that she had promoted “blood libel” against her fellow Jews.

Wilder says that she spoke to her editors at the Associated Press about the attacks and felt they had her back. “They reassured me I would not face punishment for my previous activism,” she wrote after her firing. “I was told my editors were only hoping to support me as I received an onslaught of sexist, antisemitic, racist and violent comments and messages.”

The College Republicans’ bad-faith complaints were soon amplified by major conservative figures. Everyone from Ben Shapiro to Sen. Tom Cotton of Arkansas was only too happy to pile on. The Washington Free Beacon, a neoconservative website, was there for it, too, with a story headlined “AP Hires Anti-Israel Activist as News Associate.”

The sub-headline drove home the point: “AP’s objectivity in question amid revelations it shared office space with Hamas.”

For the Associated Press, the phrase “objectivity in question” cuts deep.

The news organization was already deeply rattled after the Israeli military blew up its office in the Gaza Strip on May 15 and claimed that the Palestinian militant group Hamas had been operating out of the same high-rise.

Keeping Wilder on the payroll apparently became untenable for the AP. The company’s social media policy, which says that journalists aren’t supposed to express opinions on news topics, was their rationale for cutting her loose. But not everyone bought it.

“Amazing how quickly a talented young reporter’s career can be snuffed out by a Twitter mob that decided to feign outrage over some college tweets,” The Washington Post’s Glenn Kessler wrote on Twitter after she was fired last week. Even if she had strayed from her employer’s policies, he noted, her bosses should have educated her instead of abandoning her.

It’s an all-too-familiar situation. Traditional newsrooms want their journalists to use social media to distribute their journalism, build their brands and even develop sources. But they don’t want the trouble that often comes with it.

My newspaper has hardly avoided the quandary. Post reporter Felicia Sonmez was put on administrative leave last year after she upset some people mourning the death of NBA star Kobe Bryant by reminding them that he had been accused of rape. The Post reversed the suspension after hundreds of Sonmez’s colleagues signed a letter supporting her and criticizing the company for failing to protect her from the social media mob.

Another staffer, Wesley Lowery, left The Post after tangling with its executive editor at the time, Martin Baron, who found some of Lowery’s tweets too opinionated for a reporter. And The Post’s new top editor is Sally Buzbee, who was still nominally the top editor at the AP at the time of Wilder’s dismissal, although Buzbee has stated that she had handed off management by then and was not involved in making the decision.

AP leaders sent a memo this week to their staff of thousands across the globe, some of whom had protested Wilder’s firing. They promised to review their social media policy, which they wrote will “reiterate AP’s commitment to supporting our journalists when they are attacked, targeted or abused online.”

That’s good.

But it’s clear that news organizations need to do much more. They need to seriously grapple with the worsening plague of bad-faith attacks on journalists. They need to educate newsroom managers at all levels about how to respond.

They might start by revisiting the Gamergate controversy in 2014, the nightmarish campaign of misogynistic stalking and grievance-driven harassment against female video game journalists and other women in that industry.

The journalists who have been targeted by these kinds of attacks — especially women and people of color — best understand the insidious techniques, vile motivations and health-threatening repercussions.

Their bosses, in many cases, have some learning to do.

READ MORE by Margaret Sullivan:

For more by Margaret Sullivan visit wapo.st/sullivan