This can all be done through a plugin called "purple-facebook".
Installing the Facebook Plugin for Pidgin in Windows
- Download the following zip archive, which contains the libfacebook and libjson-glib libraries: facebookplugin4pidgin.zip
- Make sure Pidgin is not running.
- After extracting the library files, move the libjson file to Pidgin's program folder (which will be in C:\Program Files\Pidgin or C:\Program Files (x86)\Pidgin).
- Move the libfacebook file to Pidgin's plugin directory (*same directory as before*\Pidgin\plugins).
- Start Pidgin, find the Facebook plugin in your account types list (the one that does not say "(xmmp)" next to it), and use your phone number or email address to set up your login.
Installing the Facebook Plugin for Pidgin in LinuxRather than be redundant here, I am simply going to direct you towards this page, which has instructions on how to select and download an installation package for your particular distribution.
Source: Pidgin on Facebook