【发布时间】:2013-06-14 14:30:53
【问题描述】:
我们正在使用 spring-social 将我们的应用程序集成到 facebook。 在 OAuth2AuthenticationService 中,范围为空。 我们将范围设置为表单上的输入。但它不起作用并且无法设置范围。 我们无法收到用户电子邮件。
有没有办法覆盖“OAuth2AuthenticationService”范围变量?
不是:Spring 社交版本是 1.1.0.BUILD-SNAPSHOT
We used spring social sample which contains security xml version
<form name="fb_signin" id="fb_signin" action="../auth/facebook"
method="post">
<input type="hidden" name="scope"
value="email,publish_stream,read_stream,offline_access" />
<button type="submit"> <img src="../images/social/facebook/sign-in-with-facebook.png" /> </button>
<!--
<input
type="image"
src="../images/social/facebook/sign-in-with-facebook.png"
align="right" />
-->
</form>
【问题讨论】:
-
有同样的问题。如果我尝试使用
/connect/facebook而不是/auth/facebook进行身份验证,我会看到以下警告变成异常:WARN : org.springframework.social.connect.web.ConnectController - Exception while handling OAuth2 callback (Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1007E:(pos 0): Field or property 'name' cannot be found on null). Redirecting to facebook connection status page.
标签: spring-social