A Facebook account can become compromised in two ways as far as I am aware:
A hacker may gain access to your account, and are able to log into your own account and do any of the actions you would be able to do whilst logged in. They might then try to scam you or your friends, or try to commit identity fraud.
Or, a malicious application may get installed. This consequently might send out spam to your friends, often to try and spread malware, or gain access to your, and others information.
Neither of these would infect your computer directly, although a malicious app may try to get you to download an exe file to your computer - which would then infect your computer. However, if your FB Password is compromised, this could come from malware already on your computer.
Either situation wouldn't infect other devices you logged into, unless you downloaded any files that an infected/malicious app tried to get you to download.
If you have only experienced one popup, you are probably not infected with anything, but I would still check your FB account for any apps you have recently added, and your programs list for anything you didn't install.
You might want to look at getting Web of Trust
to help avoid malicious websites on Google. Using Google can often put you into contact with malicious websites, so I've always found WOT a good tool to use myself.
If your scans come up with anything, or you notice any symptoms of infection on your computer, post up a set of logs in the Virus/Trojan/Spyware Help section.