Spring-social is a project mainly written in Java, it's free.
FB Spring Social App
This sample is designed to get you up and running quickly. See the walkthrough at: https://github.com/SpringSource/spring-social/wiki/Quick-Start
To run, simply import the project into your IDE and deploy to a Servlet 2.5 or > container such as Tomcat 6 or 7. You can also deploy from the command line with: $ mvn tomcat:run
Access the project at http://localhost:8080/spring-social-quickstart
Discuss at forum.springsource.org and collaborate with the development team at jira.springframework.org/browse/SOCIAL.