Spring Social - 为 Facebook 好友获取扩展权限
我正在使用 Spring Social 及其 Facebook 集成。
我试图获取当前用户好友的详细信息(例如位置等),但结果始终为空。现在,我相信这是因为只有“user_location”或“friends_location”扩展权限才可用。
我想知道如何授权我的应用程序获得用户的这些权限,并成功获取朋友的位置等详细信息?
只是重申一下 - 这必须在我的 Spring Social 项目中完成。
提前致谢!
I am using Spring Social, and its Facebook integration.
I am trying to fetch details of the current user's friends (such as Location, etc.), but the result is always empty. Now, I believe that this is because this is available only with "user_location" or "friends_location" extended permission.
I am wondering how can I authorize my application for those permissions of the user, and successfully fetch the details like friend's location?
Just to reiterate - this has to be done within my Spring Social project.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过以下方式为您的应用程序授权用户的这些权限,
其中 userPermissions 是您需要的权限,clientId 是您的 facebook appId,redirectURI 是您授权后前往的位置(这必须与您应用程序的站点 url 相同) 。
成功获取您的朋友详细信息
您还可以通过http://static.springsource.org/spring-social-facebook/docs/1.0.x/reference/html/apis.html#facebook-getProfile
You can authorize your application for those permissions of the user in the following way
Where userPermissions is what are the permissions you need, clientId is your facebook appId, and redirectURI is where you go after authorizing (this must be same as your app's site url).
You can also fetch your friend details successfully by
http://static.springsource.org/spring-social-facebook/docs/1.0.x/reference/html/apis.html#facebook-getProfile