The facebook-chat plugin for Pidgin available in Ubuntu’s repositories is out-of-date and doesn’t work with recent versions of Pidgin spitting out “wrong-credentials” pop-ups and the like.
Instead you’ll want to use the most recent version over at the plug-in’s Google Code page – which comes in a hand .deb for for easy-peasy one-click installation.
You’ll to make sure that you remove any currently installed version of the plugin before using the updated version.