|
Project Information
Members
Featured
Downloads
Links
|
IntroductionThis application aims to provide a quick and easy way for building Java Web Applications for Facebook. It aims to provide a fast-track and all-inclusive dive deep into how the Facebook Web Applications can be built. So you can take this projects as an application model then you refactor it to meet your company's need. This project builds on top of proven open source tools. Like spring, struts, hibernate, tiles, etc. And it's free!. Built on top of these proven Facebook Java APIs: Showcase
http://apps.facebook.com/java-webapp/
http://www.consultek.us/facebook-webapp/ Latest News
FeaturesIt was becoming too big to have it here, that's why we created our Features page. How to use itThere are two ways to run the project.
Running WAR
Running Source
$ cd [PATH TO CHECKED OUT SOURCE] $ mvn -Phibernate process-resources $ cd [PATH TO CHECKED OUT SOURCE] $ mvn package Alternatively, and if you have the properties and database configured, you can create the package in just one command that creates the hibernate mappings and package: mvn clean -Dmaven.test.skip=true -Phibernate process-resources -Prelease package Configure PropertiesWhether you downloaded the WAR or checked out the source you will need to edit the facebook.properties file. If you checked out the source this file can be found under: src/main/resources/facebook.properties If you downloaded the WAR file then you can find the properties file under: WEB-INF/classes/facebook.properties These are the properties that you need to modify. There are database properties and facebook settings. Please modify the properties according to your environment: # Facebook Database facebook.db.host = 127.0.0.1 facebook.db.port = 3306 facebook.db.schema = facebook facebook.db.username = facebook facebook.db.password = facebook facebook.db.driver_class = com.mysql.jdbc.Driver # Facebook # Override these values with your own facebook.api_key= facebook.secret= facebook.login_url=http://www.facebook.com/login.php?v=1.0 facebook.callback=http://www.consultek.us/facebook-webapp/canvas facebook.connect.url=http://www.consultek.us/facebook-webapp facebook.canvas=http://apps.facebook.com/java-webapp facebook.devMode=true # possible values are iframe and fbml facebook.render.method=fbml # URL for JS and CSS server.url=http://www.consultek.us/facebook-webapp Create DatabaseIf you checked out the source code using subversion then you can create the database using maven. Execute the following commands: $ cd [PATH TO CHECKED OUT SOURCE] $ mvn -Pdb clean If you did not checkout the source then I would recommend you download the database files manually from here. Once you have the files. Open a command line and execute the following commands. Assuming your mysql root has no password. $ cd [PATH TO DB FILES] $ . create_db.sh If your mysql root user has a password edit the files: springwebmvc-hibernate/trunk/src/main/db/create_db.sh springwebmvc-hibernate/trunk/src/main/db/drop_db.sh If you want to drop the database execute the commands: $ cd [PATH TO DB FILES] $ . drop_db.sh OAuth v2NOTE: Available since version 0.4 The application has a couple of examples on how to use OAuth. You can see them here:
The source code for the above mentioned examples are: |