java Spring Social Facebook 登录的工作示例,除了 github 上的示例应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31628412/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Working example of Spring Social Facebook login except the sample applications on github
提问by Kapil Mediratta
Please can somebody share links of working example of Spring Social Facebook login except the sample applications on git hub that are provided by Spring Social people themselves. Especially if there is any sample code without the use of a database then that will be awesome.
请有人分享 Spring Social Facebook 登录的工作示例的链接,除了 Spring Social 人员自己提供的 git hub 上的示例应用程序。特别是如果有任何不使用数据库的示例代码,那就太棒了。
采纳答案by Arpit Aggarwal
Spring Social Exampleis the Spring 3.x
implementation written by me, you just have to change Facebook/Twitter
apikey
, apisecret
, callback
url and scope
as per your requirement in application.properties
here.
Spring Social Example是Spring 3.x
我写的实现,你只需要改变, , url 并根据你的要求在这里。Facebook/Twitter
apikey
apisecret
callback
scope
application.properties
回答by Sunil Kumar
Hereis the example of how to implement social login feature using spring framework.Blogof this application for precise explination.This application supprts
以下是如何使用 spring 框架实现社交登录功能的示例。此应用程序的博客用于精确解释。此应用程序支持
1) Form Login : This is classic login,where there will be a form accepting username and password.User need to submit his/her user details.
1) 表单登录:这是经典的登录方式,会有一个接受用户名和密码的表单。用户需要提交他/她的用户详细信息。
2) Social Login (Facebook,twitter & linkedin) : Here social user can signin in the application using their Facebook/Twitter/linkedin accounts. Then we add support for current users to associate their social accounts with their accounts in the application,it is also called mapping social user with local user.
2) 社交登录(Facebook、Twitter 和linkedin):在这里社交用户可以使用他们的Facebook/Twitter/linkedin 帐户登录应用程序。然后我们添加支持当前用户将他们的社交帐户与他们在应用程序中的帐户相关联,也称为映射社交用户与本地用户。
回答by Lucky
You can use the below github example,
您可以使用下面的 github 示例,
https://github.com/pkainulainen/spring-social-examples
https://github.com/pkainulainen/spring-social-examples
Source article : https://www.petrikainulainen.net/spring-social-tutorial/
文章来源:https: //www.petrikainulainen.net/spring-social-tutorial/
I don't know why you don't need the example given by Spring team. But the article and example code looks very much helpful to me. These getting started guides based on Spring Boot will help you,
我不知道你为什么不需要Spring团队给出的例子。但是文章和示例代码看起来对我很有帮助。这些基于 Spring Boot 的入门指南将帮助您,
https://spring.io/guides/gs/accessing-facebook/
https://spring.io/guides/gs/accessing-facebook/
http://projects.spring.io/spring-social-facebook/
http://projects.spring.io/spring-social-facebook/
Clone the repo from github
从 github 克隆 repo
git clone https://github.com/spring-guides/gs-accessing-facebook.git