A fake facial recognition app that claimed to be able to identify strangers from a photograph has turned out to be a publicity stunt.

Facezam claimed it could identify people by matching a photo of them with their Facebook profile. It was claimed that all users had to do is take a picture of someone on the street and run it through the app, which will tell them who it thinks the person in the photo is.

After the hoax was revealed to be the work of a viral marketing agency, Facebook said such an app violated its privacy policies.

"People trust us to protect their privacy and keep their information safe. This activity would violate our terms," Facebook said.

Facezam falsely claimed it could scan billions of Facebook profile images a second, through a database for developers, until it found a match. It claimed to be able to link most photos with a profile on the social network within 10 seconds.

"Facezam could be the end of our anonymous societies," said Jack Kenyon, who claimed to have founded Facezam. "Users will be able to identify anyone within a matter of seconds, which means privacy will no longer exist in public society."