Germany's data protection agency directed Facebook to stop its data sharing project with WhatsApp and ordered the social media giant to delete any data that they already received.

This after the social networking site said that they need to collect data from users of the messaging app, including their phone numbers, to improve their targeted ads.

While they give the user options not to allow the app to use their information for advertising, users have no option to refuse the data sharing between Facebook and WhatsApp.

Johannes Caspar, Hamburg's Commissioner for Data Protection and Freedom of Information, said Facebook does not have the WhatsApp users' permission as well as a legal basis for the data sharing. He added that it has to be the users' decision if they want to connect with the social networking site, and the site has to ask for their permission first, The Guardian reported.

Facebook has an office in Hamburg, Germany and Caspar has the authority to stop the sharing project.

However, according to a data watchdog, Facebook and WhatsApp are private companies and have their own terms and conditions and data privacy policies in processing their own user's data, as reported by Reuters.

Caspar stated that the order is to protect the data of about 35 million German WhatsApp users. Data protection authorities in France and other privacy regulators across Europe said that they will be monitoring the change to the messaging app's policy with "great vigilance."

"We will appeal this order and we will work with the Hamburg DPA in an effort to address their questions and resolve any concern," Facebook said.

Facebook bought WhatsApp for $19 billion in cash and stock two years ago. After the acquisition, both parties promised that no data will be shared between them.