Are you sure the warning came from Facebook?
Facebook are not in the business of posting malware warnings to users and I've never heard of them doing this.
Did the 'warning' come in via email, by any chance? If so I'd almost guarantee that it wasn't from Facebook at all, but it was from a scammer sending you an email that looked like it came from Facebook. Unfortunately if you followed the links in the email you've probably compromised your Facebook account and given your account details to the scammer.
You should change your Facebook account password immediately.