LONDON — Facebook is enhancing privacy safeguards for users around the world as it complies with new European rules designed to make it easier for consumers to give and withdraw consent for the use of their data.

Facebook is introducing the new policies this week in Europe, but eventually everyone on the social network will be asked to decide whether they want to enable features like facial recognition and some types of targeted advertising, the company said in a blog post.

The announcement comes as Facebook struggles with the fallout from revelations that a data analytics firm working with Donald Trump’s 2016 presidential campaign misused personal information from as many as 87 million Facebook accounts. The European Union next month will begin enforcing its new General Data Protection Regulation, which applies to any company that uses the data of EU residents, no matter where it is based.

The privacy law is the latest attempt by EU regulators to rein in mostly U.S. tech giants who they blame for avoiding tax, stifling competition and encroaching on digital privacy rights. The EU says the rules are the most important change in data privacy regulation in a generation as it tries to catch up with technological advances since 1995.

The EU rules require consent forms to be written in plain language anyone can understand, as the EU targets the legalese buried in pages of terms and conditions that few users actually read before clicking “I Agree.” The regulations also require that consent must be as easy to withdraw as it is to give.

As part of the changes, Facebook users in Europe and Canada will be able to opt into the network’s facial recognition technology, which has been available in most other parts of the world for the past six years.