MADRID — Spain’s data protection agency says it will investigate whether the recently announced exchange of personal data between WhatsApp and Facebook meets Spanish data protection legislation.

The watchdog body said it will study what information collected from WhatsApp users is sent to Facebook, for what purpose, how long it is kept and what options customers are offered if they wish to object.

It said it will coordinate with its counterparts in Germany, Italy and Britain, which have announced similar probes.

Facebook took over the WhatsApp messaging service two years ago and announced recently that WhatsApp would begin sharing user data with the social network as part of a program to synchronize the two businesses.

The agency announced its investigation in a statement Wednesday.