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:
0 komentar:
Post a Comment