FACEBOOK is being sued in the US for allegedly scanning and then selling off the details of private messages without users' consent.

A class action has been filed in California, where documents lodged against the company claim every user's worst nightmare - Facebook looks at their private messages.

The class action is being led by two Facebook users in the US, Matthew Campbell of Arkansas and Michael Hurley of Oregon.

They allege that Facebook promises users differing levels of privacy based on whether they make a public post or send a private message or chat, but they also scan private communications.

"Contrary to its representations, 'private' Facebook messages are systematically intercepted by the company in an effort to learn the contents of the users' communications," Mr Campbell and Mr Hurley claim.

"When a user composes a Facebook message and includes a link to a third party website, the company scans the content of the Facebook message, follows the enclosed link, and searches for information to profile the message sender's web activity."

The lawsuit alleges this breaches the Electronic Communications Privacy Act and Californian privacy and competition laws.

"Representing to users that the content of Facebook messages is 'private' creates an especially profitable opportunity for Facebook, because users who believe they are communicating on a service free from surveillance are likely to reveal facts about themselves that they would not reveal had they known the content was being monitored," the lawsuit states.

"Thus, Facebook has positioned itself to acquire pieces of the users' profiles that are likely unavailable to other data aggregators."

The class action is being brought on behalf of all users located within the US who have sent or received private Facebook messages that included a URL (web page link) in the content of the message.

Facebook said it will be defending itself against the claims.

"We believe the allegations are without merit and we will defend ourselves vigorously," Facebook spokeswoman Jackie Rooney said.