Login with Facebook

Hey guys, I would like to add a “Login with Facebook” functionality to my chat server, in addition to native logins. This would require sending an email address and a facebook access tokem to the server during login, and have the server check if the access token is valid for the email according to the Facebook servers.

Any ideas how I could implement this? Or at least how I could start editing the login mechanism for openfire?

Thank you