You first have to get the ConnectionRepository for the user, then use it to find the connection:
Code:
ConnectionRepository connRepo = userConnectionsRepository.createConnectionRepository(userId);
Connection<Facebook> fbConn = connRepo.getPrimaryConnection(Facebook.class); // or whatever provider you're wanting a connection for
Of course, that's the explicit coding if all you have is the UsersConnectionRepository. You'll may also have a request-scoped ConnectionRepository bean in your application context. If so, then from that you can call getPrimaryConnection(), findConnections(), or a number of other methods that will give you what you need.
Craig Walls
Spring Social Project Lead