/fishbowl

Java wrapper for Facebook's GRAPH REST API

Primary LanguageJavaGNU General Public License v2.0GPL-2.0

FacebookSDK

Description: Java wrapper for Facebook's GRAPH REST API

  1. you will need to have an active facebook app (appId,appSecret)

for more information check out : https://developers.facebook.com/docs/reference/api/

Project Setup

build the project with maven

(mvn clean install)

  1. to run the test - TestFacebook- class, fill in the facebookSDK.properties (in the 'src/test/resources' directory) with the missing parameters
  2. for the common use cases, check out the TestFacebook class

Testing

run mvn test on the project, don't forget to fill in the facebookSDK.properties

Deploying

just add the project as a maven dependency after you've built the jar file.

i.e: add the following to your project's (the one that uses the facebookSDK) pom.xml:

	<dependency>
		<groupId>me.fishbowl</groupId>
		<artifactId>facebookSDK</artifactId>
		<version>1.0-SNAPSHOT</version>
	</dependency>

Usage:

once a user logs into your app, you'll have the user's facebookID, AccessToken, Token-expiresIn and signedRequest with which you can initialize the FacebookSDKUSERAPI object:

i.e:

FacebookSDKUSERAPI facebookSDK = Facebook.getFacebookSDKUSER(facebookId, requestdata.getAccessToken(), requestdata.getExpiresIn(), requestdata.getSignedRequest());

and then use it like so:

FacebookUserData details = facebookSDK.getUserPublicDetails(facebookId);

Contributing changes

  • "Please open github issues"

License

GNU GENERAL PUBLIC LICENSE