Search code examples
javaspringsocial-networkingspring-social

What extras does SpringSocial buy me as compared to using the wrapped Twitter etc libraries directly


Taking a quick look at SpringSocial it would appear that each social network has its own different unique. There is no interface exposing a universal

  • authenticate to network
  • sendMessage

The reason for the "authenticate to network" listed above is i would like to include the facility for the application itself to publish messages rather than just individual users.

At least Jtwitter exposes a simple api to authenticate and then send a tweet. To achieve the same w/ SS the amount of complexity is overwhelming compared to the relative simplicity of Jtwitter. SS requires Spring, commons http client which obviously is a lot more than jtwitter. If SS had a universal mechanism to connect and then send rather than custom code for each then it would be probably worthwhile, but in the end it doesnt...

Are my assumptions or perceptions about SS wrong ?


Solution

  • Spring Social is composed behind the scene in four parts :

    1. An OAuth API to handle 3-legged OAuth dance (most valuable feature IHMO)
    2. A persistence layer to maintain user's accounts informations (OAuth secret, profileUrl, imageUrl, ...)
    3. Signing in with Service Provider Accounts (eg. FacebookConnect)
    4. Java binding to the provider's API, mostly based on RestTemplate

    Only the last part can be compared to wrapper libs (eg. JTwitter). If you don't need to establish OAuth connections, don't use Spring Social.

    My 2 cents thought about SS :

    I was a bit disappointed, at first glance. Spring Social is described as an extension of the Spring Framework that allows you to connect your applications with Software-as-a-Service (SaaS) providers such as Facebook and Twitter. Unfortunately this framework in v1.0 cannot be easily extended to support connections without OAuth.

    It should be better if SS have been split in 3 parts, for example :

    • spring-oauth
    • spring-mvc-signin
    • spring-social (only providers binding)