Facebook has added a security feature that will protect users against malware and phishing by warning them not to click potentially dangerous sites.

The security feature was put in place with the help of security firm WebSense, which will identify dangerous links.

With the security feature, Facebook users will see a pop-up message appear whenever they try to visit another site or attempt to click a link listed in WebSense's database as containing malware. If a link is suspected to be dangerous, the same message will encourage the user to return to the Facebook page or proceed to other webpages at their own risk.

In a blog post, WebsSense said Facebook is a target of scammers because of the social networking site's 800 million users or potential victims. Links are booby-trapped with malware and those who click it will be infected. More users are attacked when the link is shared to other Facebook users.

The infection happens as links disguised as video or other posts usually ask Facebook users to enter their log-in information to be directed to the site.

WebSense has been working with Facebook's security team to keep users safe the past few years. It has integrated its security technology into the Facebook platform to enhance the security setting of the most popular social networking site.

"By providing real-time protection from malware, spyware, inappropriate content, data leaks, and spam, we make it safe for people and businesses to use the web," said WebSense chief technology officer Dan Hubbard, according to CNN.