MUNICH, Germany — It may be the world’s leading social network, but Facebook isn’t getting much love these days in Germany, where a series of legal troubles are forcing it to play ball with the country’s strict privacy legislation.

This past week a German court ruled that commercial websites can’t embed the network’s iconic “Like” button without clearly warning users that clicking it could transfer their data straight to Facebook.

Only days before, the country’s competition watchdog launched an investigation saying Facebook may be abusing its dominance over the social media market by offering users unfair terms. In other words, it’s collecting enormous amounts of personal data for advertising, and users aren’t in on it.

According to Justus Haucap, head of the Düsseldorf Institute for Competition Economics, Facebook trades in user information the same way a traditional monopoly trades in hard currency — except with user data substituting for high prices.

“This is at the heart of the German competition authority’s investigation,” he said. “Is Facebook asking for too much?”

The investigation comes after a January ruling by Germany’s highest court that the network’s “friend finder” feature breaks the law by collecting people’s email addresses and bothering non-users with advertisements to join Facebook.

If you couldn’t already tell, personal privacy is highly valued in Germany.

Case in point: It’s even one of the reasons many Germans prefer paying for things in cash rather than with credit cards. But it also means the country has some of the world’s toughest privacy and data protection laws.

Christoph Ritzer, a Frankfurt-based lawyer, says the country’s recent history of dictatorship helped shape a constitution — or Basic Law — that’s centered on human rights.

“The fundamental right of information freedom is directly derived from the dignity of the human being, which means each person in Germany has the right to control information on himself or herself at the core of their personal freedoms,” said Ritzer, who specializes in privacy and data protection at Norton Rose Fulbright, a London-based law firm.

As if the privacy issues weren’t enough legal trouble, Facebook has also come under attack for what critics say is failing to delete online hate speech quickly. That concern has taken on fresh urgency as Europe grapples with rising xenophobia amid a refugee crisis.

The mounting criticism forced founder Mark Zuckerberg to visit Germany late last month on a “charm offensive,” Reuters reported, during which he said he respected local legislation and claimed the migrant crisis had influenced him to do more on combating hate speech.

“Learning more about German culture and German law has led us to change our approach on that,” he told an audience in Berlin.

“This is always a work in progress. I’m not going to claim up here today that we’re perfect. We’re definitely not.”