Facebook is warning employers not to demand passwords from job applicants, saying it's an invasion of privacy and violates the social networking company's longstanding policy against sharing passwords. Aside from privacy concerns, Facebook also said it considers the practice a security risk.

In a message to its users, Facebook promised to protect their privacy and security, whether by engaging policymakers or, where appropriate, by initiating legal action, including by shutting down applications that abuse their privileges.

The posting follows newspaper reports that documented cases of job applicants being asked during interviews to reveal their Facebook passwords so prospective employers can check backgrounds.

Users shouldn't be forced to share their private information and communications just to get a job, says Facebook. And friends of a user shouldn't have to worry that their private information or communications will be revealed to someone they don't know and didn't intend to share with just because the user is looking for a job.

The company also warned that the practice could expose an employer to a discrimination lawsuit if an applicant is not hired because of information found on Facebook.

Facebook did not say what sort of legal action it might bring against an employer who asks for a password as a condition for being hired, but did say it has no immediate plans to take action against any specific employers.