, a Spring-based template for accessing social networking sites from within Java programs.
Last month (November 2010), SpringSource released a first milestone for
This first milestone includes templates for Twitter, Facebook, LinkedIn and Tripit. Rather than exposing generic, URL-based APIs, the Spring Social APIs are specifically designed for each social networking site and make integrating with those sites relatively straight forward. Each template is, in turn, built on top of Spring's RestTemplate, which is a generic template for accessing any REST-based web service.
To use Spring Social, developers:
- Manually set up a one-time developer account with the target social networking site.
- Programmatically request an OAuth token from the target social networking site for each new user.
- Instantiate the right Spring Source template (ie. TwitterTemplate), passing in their developer keys as well as the OAuth key for the current user.
- Call whatever method they like on the Spring Source template object, much like calling methods on a JdbcTemplate.
Spring Social is an extension of the Spring Framework to enable the development of social-ready applications. The main features of Spring Social include:
- A set of social network templates for interacting with Twitter, Facebook, LinkedIn, TripIt, and Greenhouse.
- An OAuth-aware request factory for signing RestTemplate requests with OAuth authorization details.
- A web argument resolver for extracting Facebook user ID and access token information in a Spring MVC controller.
- Spring Social is used by Greenhouse for all of its social network integration. Have a look at the Greenhouse source code for examples of Spring Social in action.