IDG Answers is a community of experts who are passionate about technology. Ask a question or answer one below.
Hmmm, you certainly could install malware through Facebook, although as far as I know that isn't possible with the iPhone without actually choosing to install an application (or at least it isn't likely). Since the problem seems related to your Yahoo mail, my first though is that your Yahoo account has been compromised. I have a couple of acquaintances who have experienced that problem, which has been somewhat common in the past month or two.