SlashKey, the developers of the game, have been warning users via posts on their online forum, advising them not to follow the link but instead just close the window with the warning and perform an antivirus check to ensure that they have not been infected.
A lot of Farm Town players responded to the posts and said they have been faced with the warning. After some initial investigation in the matter, SlashKey believes that the pop-ups are caused by malicious advertisements:
Sophos advises users to stop playing the game until the issue is fixed or to disable adverts using browser add-ons such as Adblock Plus on Firefox.