PDA

View Full Version : facebook login email permission



timt
May 4th, 2011, 08:52 AM
Hi,

I'm testing the spring-social-showcase and I would like to retrieve the email of the facebook profile.
Is this currently possible ?

In the signin.jsp you have the following


<form id="fb_signin" action="<c:url value="/signin/facebook"/>" method="POST">
<button type="submit"><img src="<c:url value="/resources/social/facebook/sign-in-with-facebook.png"/>"/></button>
</form>


I'm not able to get the email permission.
When using the following code it works but then spring doesn't detect that I'm logged in :(


<facebook:init/>
<fb:login-button perms="email,user_birthday"/>


Any ideas ?

habuma
May 6th, 2011, 03:32 PM
As you probably know, ConnectController lets you specify a scope when connecting an account with an OAuth 2 provider such as Facebook. But it seems you've found that ProviderSignInController does not.

Scope isn't important to ProviderSignInController in the case where the user has previously connected their account to the provider. But in the case of a new user, scope is important...to establish a connection with the property authorization to do what the application needs.

What we need is for ProviderSignInController to work with scope much like ConnectController does. I've created https://jira.springsource.org/browse/SOCIAL-151 to track this.

timt
May 10th, 2011, 12:09 AM
thanks :)