Review
In the previous section, we have discussed the functional requirements of our application. In this section we will study how to generate OAuth keys for Facebook and Twitter. These are required so that Spring Social can communicate with these social media sites.Table of Contents
Click on a link to jump to that section:
- Functional Specs
- Generate OAuth keys
- Spring Social configuration
- Spring Security configuration
- JavaConfig
- ApplicationInitializer.java
- ApplicationContext.java
- DataConfig.java
- ThymeleafConfig.java
- spring.properties
- View with Thymeleaf
- Layers
- Domain
- Repository
- Service
- Controller
- Running the application
- Clone from GitHub
- Create the Database
- Run with Maven and Tomcat 7
- Run with Maven and Jetty 8
- Import to Eclipse
- Validate with W3C
Generate OAuth keys
- Open a browser
- Visit https://developers.facebook.com/apps
- Click on Create New App
- Fill-in the App Name
- You will be redirected to the Basic settings page
- Now copy the App ID value. This is your client ID
- Then copy the App Secret value. This is your client secret
Note: The values need to be stored in the spring.properties file (see Part 5).
On my sample app, here's the Basic settings page. I've purposely changed the App ID and App Secret values:
- Open a browser
- Visit https://dev.twitter.com/
- Visit the My applications page at https://dev.twitter.com/apps
- Click on Create a new application
- Fill-in the Name
- Fill-in the Description
- Fill-in the Website (You will need to invent a fictitious URL)
- You will be redirected to the Details tab of your new application
- Now copy the Consumer key value. This is your client ID
- Then copy the Consumer secret value. This is your client secret
Note: The values need to be stored in the spring.properties file (see Part 5).
On my sample app, here's the Details tab. I've purposely changed the Consumer key and Consumer secret values:
Next
In the next section, we will setup the Spring Social-related configuration through JavaConfig. Click here to proceed.
Share the joy:
|
Subscribe by reader Subscribe by email Share
Hi krams,
ReplyDeleteI've cloned your app from Github repository to my eclipse workspace. When I'm trying to build you app I got an error in pom.xml saying
"Plugin execution not covered by lifecycle configuration: com.mysema.maven:maven-apt-plugin:1.0:process (execution: default, phase: generate-sources)"
I can't get that error why it is displaying.
Can you please suggest me how to build and run this app?
Great tutorial. Maybe add something about where to place the callback url on the Facebook app page? Maybe I missed it. But I appreciate everything youve done. Thank you! I fixed the eclipse error for pom.xml by adding the following.. (if the text comes out wrong then this site might help http://wiki.eclipse.org/M2E_plugin_execution_not_covered)
ReplyDeleteorg.eclipse.m2e
lifecycle-mapping
1.0.0
com.mysema.maven
maven-apt-plugin
[1.0.0,)
process
Hi sir, i have a problem in connecting facebook so please help me where should i give client ID and client secretid then how to connect facebook
ReplyDeleteerror Not connected to provider 'facebook'
Mar 28, 2013 5:14:47 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet spring threw exception
org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "Connect to Facebook" (facebook/connect:18)
Good tutorial, thanks for putting this together.
ReplyDeleteMinor problem in the ThymeleafConfig class line 24:
resolver.addTemplateAlias("connect/twitterConnected","facebook/connected");
Should be:
resolver.addTemplateAlias("connect/twitterConnected","twitter/connected");
Cheers!
Thanks for catching that.
Deletehttp://2.bp.blogspot.com/-Zdm4t-LBf6U/UJpJEjh7xHI/AAAAAAAABd8/y2RpBfwD7UY/s45/aac46d979989dec1778616a451679a83.png
ReplyDeleteTo generate a Twitter secret key, you need to sign-up for a Twitter account first. Once you have an account, follow these steps:Billig WOW Gold
ReplyDeleteWorld of Warcraft Gold Kaufen Billig
Hello Krams,
ReplyDeleteI really need your help on the expression-based access control tutorial. I don't know how to reach you. The question is the following.
I have seen your posts about expression-based access control. Even though I am new for SpEL, I must use it to implement my spring security project. I want to implement attribute-based access control by using ACL and SpEL. But I failed to go further because of my SpEL limitation. I hope u can help me a little bit how to handle the following problem.
Consider the following expressions to secure the method 'edit'.
@PreAuthorize("hasPermission(#data, 'WRITE')and (#user.name == 'David')")
public Boolean edit(ResourceData data, User user) {
//do something
return true;
}
Here, what I want to do is securing the method 'edit' by using the two SpELs. the first expression, i.e. hasPermission(#data, 'WRITE' works fine, because I am using ACL for this. But for the 2nd expression I am using database that stores user details of the class 'User'. Assume that I have member variable 'name' for the 'User' class and its corresponding getter and setter methods. I can retrieve 'name' values from DB. But I don't know how to pass those values in this expression, even I don't know how to compare the values in this expression. I am not using XML file for the 2nd expression, I have XML for for the first expression, i.e. for the ACL. By the way this method is quite similar to what you have implemented on the expression-based access control tutorial. The only difference is I want to add extra restrictions by considering user details which is saved from DB.
Can u provide me some information please? Thanks in advance for your cooperation!
Hi Sir,
ReplyDeleteI do follow all your post. its nice and very informative. I have learnt so many things from your post. Thanks you so much Sir for the blogs. Sir, Please keep updating your post. If you have any other blogs or website please do let me know. Thank you in advance.
Hi Sir,
ReplyDeleteI do follow all your post. its nice and very informative. I have learnt so many things from your post. Thanks you so much Sir for the blogs. Sir, Please keep updating your post. If you have any other blogs or website please do let me know. Thank you in advance.
thank u for sharing this valuable information.it's very useful to learners.we are providing spring online training.
ReplyDeletespring ONLINE TRAINING
generate OAuth keys for Facebook and Twitter (Online Java Training) Generate OAuth keys Java Training in Chennai Consumer key and Consumer secret values: J2EE Training in Chennai
ReplyDeleteI get a lot of great information from this blog. Thanks for sharing this valuable information to our vision. You have posted
ReplyDeletea trust worthy blog keep sharing.
sap scm training
sap fico training
This is a very well-written blog. I read and liked the blog and have also bookmarked you. All the best for future endeavors
ReplyDeletesap scm training
sap fico training
I have read your blog its very attractive and impressive. I like it your blog.
ReplyDeleteSpring online training Spring online training Spring Hibernate online training Spring Hibernate online training Java online training
spring training in chennai spring hibernate training in chennai
Very nice your blog and article. I like this blog thank for sharing.
ReplyDeleteทางบ้าน
i will provide you Backlinks and rank in google you website as compare to your competitor also get compititors backlinks list and make their backlinks yours.
ReplyDeleteGiven so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more. You can take this oppurtunities to improve your stable career option.
ReplyDeleteAWS Training in Chennai | Best AWS Training Institute in Chennai | AWS Training in Velachery | AWS Training in OMR | AWS Training with Placements
You done a really great job by sharing your blog.This information was very useful to us.
ReplyDeleteAWS Training in Chennai | Best AWS Training Institute in Chennai
Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
ReplyDeleteData Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Data science training in kalyan nagar
Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
ReplyDeleteDevops training in Chennai
Devops training in Bangalore
Devops Online training
Devops training in Pune
Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
ReplyDeletejava training in annanagar | java training in chennai
java training in marathahalli | java training in btm layout
java training in rajaji nagar | java training in jayanagar
java training in chennai
I have picked cheery a lot of useful clothes outdated of this amazing blog. I’d love to return greater than and over again. Thanks!
ReplyDeletejava training in chennai | java training in bangalore
java training in tambaram | java training in velachery
java training in omr | oracle training in chennai
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeletecore java training in Electronic City
Hibernate Training in electronic city
spring training in electronic city
java j2ee training in electronic city
This comment has been removed by the author.
ReplyDelete
ReplyDeleteInspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..
angularjs Training in online
angularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in btm
I found this informative and interesting blog so i think so its very useful and knowledge able.I would like to thank you for the efforts you have made in writing this article.
ReplyDeletepython online training
python training in OMR
python training course in chennai
Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
ReplyDeleteangularjs-Training in tambaram
angularjs-Training in sholinganallur
angularjs-Training in velachery
angularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in btm
angularjs Training in electronic-city
This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic
ReplyDeletebest openstack training in chennai | openstack course fees in chennai
java training in chennai | primavera training in chennai
Wonderful blog, I feel really happy to visit this blog.
ReplyDeleteData Science Course in Chennai
Data Analytics Courses in Chennai
AWS course in Chennai
Angularjs course in Chennai
RPA courses in Chennai
UiPath Training in Chennai
Blue Prism Training in Chennai
Informative post, thanks for sharing.
ReplyDeleteSpring Training in Chennai
Spring Hibernate Training in Chennai
Hibernate Training in Chennai
Spring and Hibernate Training in Chennai
Struts Training in Chennai
The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea.
ReplyDeletehere by i also want to share this.
Java training in Chennai
Java training in Bangalore
Java online training
Java training in Pune
Its is good and very informative.
ReplyDeleteRegards,
Best Devops Training in Chennai | Best Devops Training Institute in Chennai
" I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
ReplyDelete"
apple iphone service center in chennai | apple ipad service center in chennai | iWatch service center chennai | apple iphone service center in chennai
I think this is one of the best blog for me because this is really helpful for me. Thanks for sharing this valuable information for free
ReplyDeletepackers and movers in patna
................................................................................
ReplyDeleteread visit info.
This is best one article so far I have read online, I would like to appreciate you for making it very simple and easy
ReplyDeleteRegards,
Devops Training in Chennai | Devops Certification in Chennai
An amazing web journal I visit this blog, it's unbelievably wonderful. Oddly, in this blog's content made without a doubt and reasonable. The substance of data is informative.
ReplyDeleteAn astounding web diary I visit this blog, it's inconceivably magnificent. Strangely, in this current blog's substance made point of fact and sensible. The substance of information is instructive.
A bewildering web journal I visit this blog, it's unfathomably heavenly. Oddly, in this present blog's substance made purpose of actuality and reasonable. The substance of data is informative
A befuddling web diary I visit this blog, it's incredibly grand. Strangely, in this present blog's substance made motivation behind fact and sensible. The substance of information is instructive
Oracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeleteSpring training in Electronic City
This comment has been removed by the author.
ReplyDeletenice blog
ReplyDeleteandroid training institutes in coimbatore
amazon web services training in coimbatore
data science training in coimbatore
python training institute in coimbatore
ccna training institute in coimbatore
Really Appriciate your Work For Posting this Blog
ReplyDeleteData Science Training in Bangalore
Data Science Training in Marathahalli
Thanks for sharing such a good blog.
ReplyDelete"Yaaron media is one of the rapidly growing digital marketing company in Hyderabad,india.Grow your business or brand name with best online, digital marketing companies in ameerpet, Hyderabad. Our Services digitalmarketing, SEO, SEM, SMO, SMM, e-mail marketing, webdesigning & development, mobile appilcation.
"
Best web designing companies in Hyderabad
Best web designing & development companies in Hyderabad
Best web development companies in Hyderabad
http://www.ayamjago.asia/
ReplyDeleteVery useful and informative blog. Thank you so much for these kinds of informative blogs.
ReplyDeleteWe are also a digital marketing company in gurgaon and we provide the website design services,
web development services, e-commerce development services.
website designing in gurgaon
best website design services in gurgaon
best web design company in gurgaon
best website design in gurgaon
website design services in gurgaon
website design service in gurgaon
best website designing company in gurgaon
website designing services in gurgaon
web design company in gurgaon
best website designing company in india
top website designing company in india
best web design company in gurgaon
best web designing services in gurgaon
best web design services in gurgaon
website designing in gurgaon
website designing company in gurgaon
website design in gurgaon
graphic designing company in gurgaon
website company in gurgaon
website design company in gurgaon
web design services in gurgaon
best website design company in gurgaon
website company in gurgaon
Website design Company in gurgaon
best website designing services in gurgaon
best web design in gurgaon
website designing company in gurgaon
website development company in gurgaon
web development company in gurgaon
website design company
Spesial untuk Pemula! Berikut Situs Judi Resmi dengan Aman
ReplyDeletedaftar samgong
daftar samgong
ReplyDeletedaftar samgong
Nikmati Penawaran Bonus Agen Judi Bola Terpercaya
ReplyDeletenice
ReplyDeletebrunei darussalam web hosting
costa rica web hosting
costa rica web hosting
hong kong web hosting
jordan web hosting
turkey web hosting
nice
ReplyDeletebrunei darussalam web hosting
costa rica web hosting
costa rica web hosting
hong kong web hosting
jordan web hosting
turkey web hosting
excellent blogs.....!!!
ReplyDeletechile web hosting
colombia web hosting
croatia web hosting
cyprus web hosting
bahrain web hosting
india web hosting
iran web hosting
kazakhstan web hosting
korea web hosting
moldova web hosting
agen maxbet
ReplyDeletelivechat blue bet
link alternatif cbet
judi bola
daftar akun sbobet
Get all of the best cars and motorcycles for free
ReplyDeleteGet all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Get all of the best cars and motorcycles for free
Water Hack Burns 2 lb of Fat OVERNIGHT
ReplyDeleteMore than 160 thousand women and men are trying a easy and secret "liquids hack" to lose 1-2 lbs each and every night in their sleep.
It is easy and works on everybody.
This is how you can do it yourself:
1) Take a glass and fill it up half full
2) Then learn this weight loss HACK
so you'll be 1-2 lbs lighter as soon as tomorrow!
Very useful and informative blog. Thank you so much for these kinds of informative blogs.
ReplyDelete7 tips to start a career in digital marketing
“Digital marketing is the marketing of product or service using digital technologies, mainly on the Internet, but also including mobile phones, display advertising, and any other digital medium”. This is the definition that you would get when you search for the term “Digital marketing” in google. Let’s give out a simpler explanation by saying, “the form of marketing, using the internet and technologies like phones, computer etc”.
we have offered to the advanced syllabus course digital marketing for available join now
more details click the link now
https://www.webdschool.com/web-development-course-in-chennai.html
Thank for this blog are more informative step by step and useful information.
ReplyDeleteI here by attached my site would you see this blog
Web designing trends in 2020
When we look into the trends, everything which is ruling today’s world was once a start up and slowly begun getting into. But Now they have literally transformed our lives on a tremendous note. To name a few, Facebook, Whats App, Twitter can be a promising proof for such a transformation and have a true impact on the digital world.
we have offered to the advanced syllabus course web design and development for available join now
more details click the link now
https://www.webdschool.com/web-development-course-in-chennai.html
This is how my friend Wesley Virgin's story starts in this SHOCKING AND CONTROVERSIAL video.
ReplyDeleteAs a matter of fact, Wesley was in the army-and soon after leaving-he revealed hidden, "MIND CONTROL" tactics that the government and others used to get anything they want.
These are the same methods tons of celebrities (notably those who "come out of nothing") and the greatest business people used to become wealthy and famous.
You probably know that you use only 10% of your brain.
That's mostly because most of your brain's power is UNCONSCIOUS.
Perhaps that thought has even taken place INSIDE OF YOUR own head... as it did in my good friend Wesley Virgin's head about seven years back, while driving an unregistered, beat-up bucket of a car with a suspended license and $3.20 on his banking card.
"I'm absolutely frustrated with living paycheck to paycheck! When will I become successful?"
You've taken part in those questions, ain't it so?
Your success story is going to happen. You just need to take a leap of faith in YOURSELF.
CLICK HERE TO LEARN WESLEY'S METHOD
Very nice and interesting post, thanks for sharing...
ReplyDeleteDevops Course in Bangalore
I will recommend anyone looking for Business loan to Le_Meridian they helped me with Four Million USD loan to startup my Quilting business and it's was fast When obtaining a loan from them it was surprising at how easy they were to work with. They can finance up to the amount of $500,000.000.00 (Five Hundred Million Dollars) in any region of the world as long as there 1.9% ROI can be guaranteed on the projects.The process was fast and secure. It was definitely a positive experience.Avoid scammers on here and contact Le_Meridian Funding Service On. lfdsloans@lemeridianfds.com / lfdsloans@outlook.com. WhatsApp...+ 19893943740. if you looking for business loan.
ReplyDeletevery good post...
ReplyDeletecoronavirus update
inplant training in chennai
inplant training
inplant training in chennai for cse
inplant training in chennai for ece
inplant training in chennai for eee
inplant training in chennai for mechanical
internship in chennai
online internship
Wonderfull post.....
ReplyDeleteCoronavirus Update
Intern Ship In Chennai
Inplant Training In Chennai
Internship For CSE Students
Online Internships
Internship For MBA Students
ITO Internship
nice information
ReplyDeleteIntern Ship In Chennai
Inplant Training In Chennai
Internship For CSE Students
Coronavirus Update
Online Internships
Internship For MBA Students
ITO Internship
Thank you for this informative blog
ReplyDeletepython training in bangalore | python online training
artificial intelligence training in bangalore | artificial intelligence online training
machine learning training in bangalore | machine learning online training
blockchain training in bangalore | blockchain online training
uipath training in bangalore | uipath online training
update Promotion AirAsia
ReplyDeleteAirAsia
WOW! I Love it...
ReplyDeleteand i thing thats good for you >>
DREAM MEANNING Thank you!
I will be looking forward to your next post. Thank you
ReplyDeleteจ๊ะ อาร์สยาม รุดเยี่ยมให้กำลังใจ โรเบิร์ต สายควัน
I will be looking forward to your next post. Thank you
ReplyDeleteน้องแคท สุดซอย เน็ตไอดอลสุดฮอต สไตล์ญี่ปุ่น
Really useful information. Thank you so much for sharing.It will help everyone.Keep Post.
ReplyDeleteAI Training in Hyderabad
thanks for sharing we at SynergisticIT offer the best aws training california
ReplyDelete
ReplyDeleteNice article and thanks for sharing with us. Its very informative
Machine Learning Training in Hyderabad
ReplyDeleteNice article and thanks for sharing with us. Its very informative
Plots in PHARMA CITY
Good blog informatve for readers such a nice content keep posting thanks for sharing Beard Transplant
ReplyDeleteI liked your site very much, but brother, bsc 2nd year time table you have put DA in all these Directory Submission websites, why have you not added bsc.
ReplyDeleteMOST POPULAR ONLINE GAMES SIGN UP HERE >>>
ReplyDeleteเทคนิคแทงรูเลตให้ได้เงิน
สูตรน้ำเต้าปูปลาได้ผลจริง
ยิงปลาฟรีบนมือถือ
ยิงปลา เครดิตฟรี
บาคาร่าพารวย ทำเงินได้จริง
ป๊อกเด้งมือถือ เงินล้าน
วิธีเล่นบาคาร่า เข้าใจง่าย
บาคาร่า สูตรทำเงินที่ดีที่สุด
The best online games, the best earning money.
ReplyDeleteหวยรัฐบาลออนไลน์
PG SLOT Wallet
เลขเด็ด หวยลาว
ป๊อกเด้งออนไลน์ ฟรีเครดิต
สูตร วินเลข 2 ตัวยี่กี
การเล่น SLOTXO
Thanks for sharing your info. I truly appreciate your efforts
ReplyDeleteand I will be waiting for your next pos thanks once
again.https://streetbettings.net
https://spread-betting.org
https://baseballbettingpredictions.com
https://samratcricketbettingtips.com
https://homerunsportsbetting.com
good article I like the information you mentioned.thank you so much
ReplyDeletejoker123
ReplyDeleteslotxo auto
play good job teram
ReplyDeleteufafc
แตกง่าย แตกไว แตกในได้เลย
ReplyDeleteslotxo auto
ฝาก-ถอน ไวจริง
วิธีเล่น หวยยี่กี
ReplyDeleteเล่นไฮโล ให้ได้เงิน
เว็บเล่นบาคาร่า
liverpool
ReplyDeleteข่าวลิเวอร์พูล
A good website is useful.
ReplyDeleteป๊อกเด้ง ออนไลน์ เงินจริง
เกมป๊อกเด้ง เล่นเกมส์
วิธีเล่นคาสิโน
หวยรายวัน
I was very happy to find this site. I would like to thank you for this special reading. Thank you very much
ReplyDeletewordpress Casino
ufa88kh.blogspot Casino
youtube Casino
កាស៊ីណូអនឡាញ
Very informative and well-written post! Quite an interesting and nice topic chosen for the post. Your need social service our many type service here please check buy facebook followers
ReplyDeletePhilips
Wireless LED Lights are designed to increase safety, security and convenience anywhere around the home. Signature features include motion.
ReplyDeleteเกมรูเล็ต
ReplyDeleteไก่ชนออนไลน์ ในมือถือ
รอยคีน
ReplyDeleteสูตรบาคาร่าฟรี
เกมรูเล็ต
Lucassalon is one of the
ReplyDeleteBest Hair stylist in Hyderabad . We provide services-
Hair Volume treatment in Hyderabad
Best Hair colour Salon in Hyderabad
French Balayage Hair Colour in Hyderabad ,Advance Hair Fall treatment in Hyderabad
Best Hair Fall treatment in Hyderabad and more.
best mobile crm for small business
ReplyDeleteI appreciate how this blog breaks down complex concepts into easy-to-understand explanations. The writer has a knack for simplifying technical topics without oversimplifying them. It's a go-to resource for beginners and seasoned professionals alike.
ReplyDeleteAlso, check Java training in Nagpur
great post java course in satara
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks for sharing this informative blog.
ReplyDeleteTeam outing resorts in Ooty
thanks for valuable info
ReplyDeletegcp data engineer training in hyderabad