A top European Union legal adviser said Tuesday that social media networks like Facebook could be ordered to take down anywhere in the world any text, photo or other media ruled to be defamatory by a court.

The case concerns a Facebook user who shared an online article on their personal page about Austrian Greens politician Eva Glawischnig-Piesczek.

The user put a disparaging comment about Glawischnig-Piesczek under a "thumbnail" photo from the article so she took legal action to make Facebook stop the comment from spreading.

An Austrian court ruled that the comments were intended to insult and defame the politician and Facebook removed access to them in Austria.

In his legal opinion , EU Court of Justice Advocate General Maciej Szpunar said companies like Facebook can be ordered by a court "to seek and identify, among all the information disseminated by users of that platform, the information identical to the information that has been characterized as illegal."

Szpunar said that since European law on electronic commerce "does not regulate the territorial scope of an obligation to remove information disseminated via a social network platform, it does not preclude a host provider from being ordered to remove such information worldwide."

He said that his recommendation sought to respect the balance between privacy rights, the freedom to do business and freedom of expression.

The adviser's decision is not legally binding but top EU courts follow that guidance in most cases.