At the moment, there's no *official* support for using Spring Social connection data in client-side Javascript code. But it could be done in one of two ways:
- If you want to make direct calls to Twitter or Facebook APIs from the client (either via jQuery or via the provider's own JS API), you'll need to get the access token from the server side to the client side somehow to be able to properly construct the requests. This is a bit hackish, though.
- It's a bit more work, but I believe the best way is for you to provide your *own* REST API that the client talks to. That API would then make the calls to FB or Twitter from the server-side on behalf of the client.
Bringing Spring Social forward in the stack to the client-side Javascript code is something that I've been thinking a lot about lately. I have no specific plans at this time, but I hope to have a more complete answer for you sometime in the future.
Craig Walls
Spring Social Project Lead