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.
Answer
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.
http://thenextweb.com/insider/2013/01/31/yahoo-mail-users-still-seeing-a...