Fórum
How to change scope of permission in Facebook authorization?
Marcin Sareło, modificado 11 Anos atrás.
How to change scope of permission in Facebook authorization?
New Member Postagens: 21 Data de Entrada: 27/06/12 Postagens Recentes
Hi
How to change scope of permission in url when user is authorized?
I tried change permissions at developers.facebook.com but have no effect.
How to change scope of permission in url when user is authorized?
I tried change permissions at developers.facebook.com but have no effect.
Marcin Sareło, modificado 11 Anos atrás.
RE: How to change scope of permission in Facebook authorization?
New Member Postagens: 21 Data de Entrada: 27/06/12 Postagens Recentes
Nobody don't know where i change url parameters?
Peter Hellstrand, modificado 11 Anos atrás.
RE: How to change scope of permission in Facebook authorization?
Regular Member Postagens: 166 Data de Entrada: 30/11/11 Postagens Recentes
Look in navigation.jsp
Create a hook and extend the scope.
Create a hook and extend the scope.
<%
String facebookAuthRedirectURL = FacebookConnectUtil.getRedirectURL(themeDisplay.getCompanyId());
facebookAuthRedirectURL = HttpUtil.addParameter(facebookAuthRedirectURL, "redirect", HttpUtil.encodeURL(loginRedirectURL.toString()));
String facebookAuthURL = FacebookConnectUtil.getAuthURL(themeDisplay.getCompanyId());
facebookAuthURL = HttpUtil.addParameter(facebookAuthURL, "client_id", FacebookConnectUtil.getAppId(themeDisplay.getCompanyId()));
facebookAuthURL = HttpUtil.addParameter(facebookAuthURL, "redirect_uri", facebookAuthRedirectURL);
facebookAuthURL = HttpUtil.addParameter(facebookAuthURL, "scope", "email"); [b]//<--- Here[/b]
String taglibOpenFacebookConnectLoginWindow = "javascript:var facebookConnectLoginWindow = window.open('" + facebookAuthURL.toString() + "','facebook', 'align=center,directories=no,height=560,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=1000'); void(''); facebookConnectLoginWindow.focus();";
%>
Marcin Sareło, modificado 11 Anos atrás.
RE: How to change scope of permission in Facebook authorization?
New Member Postagens: 21 Data de Entrada: 27/06/12 Postagens Recentes
Thanks for replay!
Yes, I know, but I use Liferay 6.05. I edit FacebookConnectAction.java :
And still doesn't work.
In Liferay 6.1 login by Facebook doesn't work after simple configuration, but in 6.05 work without any problems.
Yes, I know, but I use Liferay 6.05. I edit FacebookConnectAction.java :
redirect = HttpUtil.addParameter(redirect, "scope", "email,user_about_me,publish_actions,publish_stream");
And still doesn't work.
In Liferay 6.1 login by Facebook doesn't work after simple configuration, but in 6.05 work without any problems.
Peter Hellstrand, modificado 11 Anos atrás.
RE: How to change scope of permission in Facebook authorization?
Regular Member Postagens: 166 Data de Entrada: 30/11/11 Postagens Recentes
OK
Works for me. I do this Liferay 6.1 in a post login hook. The url can be used to get user intererst with Spring RestTemplate for example.
Works for me. I do this Liferay 6.1 in a post login hook. The url can be used to get user intererst with Spring RestTemplate for example.
HttpSession session = (request).getSession();
String token = (String) session.getAttribute("FACEBOOK_ACCESS_TOKEN");
String url = "https://graph.facebook.com/me/interests?access_token="+token;