This problem has been discussed in a couple of places for MONTHS now. If neither of those solutions worked for you, may this one will.
If you have two-factor authentication enabled (and you should) then don’t use your main facebook password that you log into facebook.com with, and don’t bother with the SMS codes. Instead, you need to generate a custom password just for your chat client (Pidgin, or whatever you have).
Open up the security page on facebook and hit “generate app passwords” in the App Passwords section:
Give it a name you can recognize (the name of your chat client, phone device, etc)
Use the newly generated password in your favorite chat app:
Done!
Now you have a secure and reliable way to connect to Facebook from Pidgin (or whatever you use) :)
Thank you!
thanks
Been There done that and doesnt work :(
Thank You, it works, i use pidgin on linux mint 17.1 64 bit