I am trying to integrate facebook login into my site and while logging in I also want users email address if he successfully logs in. What should be the rightway to do it..?
I tried several ways 1) in aspx page i wrote this <fb:login-button v="2" size="medium" onlogin="window.location.reload ();">Connect with Facebook</fb:login-button> it works fine and prompts for login and in VB (backend) I use below code to access users normal info ----------------------------------------------------------------------------------------------------------------------------------------------- I am using facebook developer kit 3.0 _connectSession = New ConnectSession(APPLICATION_KEY, SECRET_KEY) _facebookAPI = New Api(_connectSession) Dim user As user = _facebookAPI.Users.GetInfo() dim fstName as string = user.first_name ----------------------------------------------------------------------------------------------------------------------------------------------- Now I want that I can get his email using user.email but that is not available. So i tried 2) i put below code in aspx page- <fb:prompt-permission v="2" size="medium" perms="email">Would you like to receive email from our application?</fb:prompt-permission> It works but only if I am already logged in facebook in same browser somewhere I read also that few XFBML tag require a session (ref: http://www.somethingtoputhere.com/demo/xfbml_console/index.html) Q-1) Cant it be same code prompts for login first if no session is there and then asks for email permission? Q-2) isnt there somethig I can set extended permission popup in vb only (by navigateUrl function) if his login is successful something like- if I am getting user.getInfo (means user is logged in) then I can set extended permission for email
