我在使用Spring Social建立与Linkedin Api的连接时遇到了麻烦.
我将"范围"变量"r_emailaddress"作为隐藏字段传递给表单以检索电子邮件地址但它不起作用 - 我没有像你这样看到email_address权限.https://developer.linkedin.com/sites/default/files/gp-dialog.png
我正在关注Spring Social Showcase应用程序示例.我应该补充一点,社交应用程序没有隐藏的范围字段.
它适用于Facebook.
形成
<form name="linkedinin_signin" id="linkedin_signin" action="${linkedin_uri}" method="POST">
<input type="hidden" name="scope" value="r_basicprofile, r_emailaddress" />
<input type="image" src="${linkedin_img_uri}" />
</form>
Run Code Online (Sandbox Code Playgroud)
LinkedIn是OAuth 1.0a提供商是正确的,并且"范围"参数对于OAuth 1.0(a)而言是非标准的.因此,Spring Social无法识别OAuth 1.0(a)提供程序的范围参数.
但是,您可能有兴趣知道昨天我将一个更改推送到Spring Social,它将允许任意参数传递到请求令牌URL和授权URL ...包括"scope"参数.这个相对较新的更改仅在最新的1.1.0.BUILD-SNAPSHOT版本中可用,但很快将在1.1.0.M2中出现.这应该满足您的需求.
您可能还想查看Spring Social Showcase示例,因为它现在使用"scope"参数在用户连接到LinkedIn时请求"r_emailaddress"范围.
我很感激您对此更改的任何反馈,最好是对https://jira.springsource.org/browse/SOCIAL-349或在Spring社交论坛http://forum.springsource.org/forumdisplay的评论. php?82-Social.(我不会像在Spring社交论坛上那样经常监视StackOverflow上的问题.)
| 归档时间: |
|
| 查看次数: |
1907 次 |
| 最近记录: |