Over the past few days, many users have complained about finding links on their Facebook pages taking them to images depicting jarring violence and graphic pornography.

Facebook on Nov. 16 said  it has stopped most of the spam that has flooded many users’ pages with pictures showing graphic sex and violence. But the social-networking company urged its 800 million-plus users to remain vigilant to keep their accounts from being hijacked.

That includes reporting suspicious links on friends’ pages and not clicking on links that offer deals that are too good to be true.

Social-networking sites are popular targets for spammers, because people are more likely to trust and share content that comes from people they know. This makes spam, scams, and viruses easy to spread.

Still, Facebook says less than 4 percent of content shared on the site is spam. By comparison, about 74 percent of eMail is spam, according to security firm Symantec, though the bulk of eMail spam gets filtered out before reaching users’ inboxes.

Over the past few days, many users have complained about finding links on their Facebook pages taking them to images depicting jarring violence and graphic pornography. Although the way the latest spam messages spread isn’t new, their content is more shocking than the typical scam enticing a free iPod shuffle.

The latest attack tricked users into clicking on links by offering some sort of promise—free plane tickets, a fun new video, or answers to a quiz, for example, said Vikram Thakur, principal security response manager at Symantec.

Clicking on the link took users to a page that asked them to copy and paste a line of malicious JavaScript programming code into the address bar of their web browser.