To verify that the solution below applies in your case turn on the OAuthCallback and OauthCallBack logging on trace level.
The json response probably does not contain the email field that is setup in the configuration, but only a name and id.
If this is the case then change the constant UserInfoURI_Facebook to
https://graph.facebook.com/me?fields=id,name,email&access_token=
To test if this works goto https://developers.facebook.com/tools/explorer/348496708652246/
to test the results you would get from the userinfo call.
Another issue might be that FB only returns verified mail addresses and other privacy settings might prevent the address to be returned.
Hope this helps in authorizing your users with their FB account
Hello Darshan,
Error 500 is an internal server error - you will have to debug your Java code to find out what it is.
Hope this helps.