PARIS (Reuters) - French President Emmanuel Macron’s plans to legislate against fake news are running into opposition.

French President Emmanuel Macron delivers his New Year wishes to members of the diplomatic corps at the Elysee Palace in Paris, France, January 4, 2018. REUTERS/Yoan Valat/Pool

Twitter users have propelled “InventYourFakeNews” to a top trending topic, opposition lawmakers warn of a risk to civil liberties and experts say a law might not be the best tool.

Macron’s announcement Wednesday was the latest attempt by a government to find ways to handle the worldwide spread of disinformation on social media -- “fake news”, as U.S. President Donald Trump calls it.

His plan would allow judges to block a website or a user account, in particular during an election, and oblige internet platforms to publish the names of those behind sponsored contents. That raises more questions than answers, critics said.

“Only authoritarian regimes try to control what the truth is,” said senior conservative senator Bruno Retailleau. Freedom of expression carries risks, but that’s better “than the temptation to control minds,” he said.

Twitter users in France made up their own fake news with the hashthag #InventeDesFakeNews (or InventYourFakeNews), which ranged from seeing corporate executives donate money to cut France’s debt load to seeing dead singers alive. Meanwhile, Macron’s opponents across the political spectrum slammed the plan.

“Is France still a democracy if it muzzles its citizens? This is very worrying!” National Front leader Marine Le Pen said on Twitter.

Attempts to regulate speech online walk a fine line, which critics says can amount to censorship. A similar law in Germany led authorities to briefly block a satirical magazine’s Twitter account on Wednesday after it parodied anti-Muslim comments.

Major internet platforms Facebook and Google declined to comment directly on Macron’s announcement, instead pointing out initiatives where they attempt to self-regulate or cooperate with local media, including in France, to track fake news.

“Any regulation should be thought through together with the industry,” internet legislation lawyer Christelle Coslin said. She noted that an 1881 law already allows prosecution for the publication of fake information. It would be crucial, she said, to make sure that any ruling by a judge would be technically enforceable.

“The real question is who can say what is a true or fake information?”, Coslin said.

Macron has a solid majority in parliament and could get a bill approved without support from the opposition.

Concern about fake news arose after accusations of Russian meddling in the U.S. presidential election in November 2016 and in last year’s French presidential election. Macron’s team complained then that his campaign was targeted by a “massive and coordinated” hacking operation.

The European Commission has opened a wide-ranging consultation on how to cope with fake news; its results are expected in the coming months.