Abhinav Maheshwari has written a java library to connect and authenticate with openid and popular social networks like Twitter, Facebook and Google.
A demo is also available at: http://opensource.brickred.com/socialauthdemo
A demo is also available at: http://opensource.brickred.com/socialauthdemo
I know that Lanoba has as Javascript SDK for authentication with Facebook, Twitter and OpenID.
Perhaps it could help you.
Good luck,
http://hybridauth.sourceforge.net/index.html