Facebook wants to get up close and personal with its users after a patent was revealed detailing a desire to secretly watch users through their webcam or smartphone camera, spying on your mood in order to sell you tailored content or advertisements.

The purpose behind the invasive idea is to analyse people through the camera in real time while they browse online and if it recognises you looking happy, bored or sad, it would deliver an advert fitting your emotion. If you were forlorn, for example, it would be able to serve an ad to perk you up, or know what products you had previously looked at online and put them under your nose at just the right time.

Facebook explains in the patent application that a user who looked away during certain content (in their fictional case it was a kitten video) algorithms for the social network would know to not show more of that type of content. In another example it describes how the technology could tell if a user's expression changed while looking at posts or pictures from a certain person and would show more or less of these in the future.

The social network has filed several patents over the years on emotion-based technology but this, based on 'passive imaging data' is perhaps the most unnerving, considering it would take control of cameras that weren't even switched on by the user.

As described by CB Insights: "This patent proposes capturing images of the user through smartphone or laptop cameras, even when the user is not actively using the camera. By visually tracking a user's facial expression, Facebook aims to monitor the user's emotional reactions to different types of content."

The New York-based intelligence firm went on to say: "On the one hand, they want to identify which content is most engaging and respond to audience's reactions, on the other emotion-detection is technically difficult, not to mention a PR and ethical minefield."

Other patents listed by Facebook include a text messaging platform to detect a user's mood by measuring how hard and fast they were typing, then augment the message format, such as adding emojis or changing the font size, to match their emotion.

The patent for taking control of the camera of a user's device was granted back in 2015 but there has been no introduction of the technology in the wild. Facebook, however, will always have to notify members in advance of any changes. Yet, this would likely be a hard sell.

A Facebook spokesperson provided IBTimesUK with the following statement: "We often seek patents for technology we never implement, and patents should not be taken as an indication of future plans."

With the danger of online privacy edging its way to the foreground of public awareness many would no doubt be wary about giving away such intimate access. After all, even Facebook CEO Mark Zuckerberg is alert to the dangers of being spied on after a picture he posted online showed his laptop's webcam and microphone port taped over.