Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

108 lines (71 sloc) 5.728 kB

Facebook SDK Grails Plugin

Introduction

The Facebook Platform is a set of APIs that make your application more social. Read more about integrating Facebook with your web site on the Facebook developer site.

This project contains the open source Grails Facebook SDK Plugin that allows you to integrate the Facebook Platform on a website/app powered by Grails.

This plugin is a port of the official Facebook PHP SDK V3.1.1 to Grails 2.0.

It supports the latest OAuth2.0 authentication (required since October 1st 2011).

Grails Facebook SDK Plugin provides the following Grails artefacts:

Installation

Declare the plugin dependency in the BuildConfig.groovvy file, as shown here:

grails.project.dependency.resolution = {
        inherits("global") { }
        log "info"
        repositories {
                //your repositories
        }
        dependencies {
                //your regular dependencies
        }
        plugins {
                //here go your plugin dependencies
                runtime ':facebook-sdk:0.4.5'
        }
}

Config

Create a Facebook app on Facebook Developers, in order to get your own app ID and app secret.

Add your Facebook app parameters to your grails-app/conf/Config.groovy:

grails.plugin.facebooksdk.app.id = {APP_ID}
grails.plugin.facebooksdk.app.permissions = {APP_PERMISSIONS} // Ex. ['email','user_photos']
grails.plugin.facebooksdk.app.secret = {APP_SECRET}

Getting started with a demo app

If you want to quickly run the SDK on a demo app, you can download Facebook SDK Grails - Demo.

Integration with Shiro Grails Plugin

To see an example of integration with Shiro Grails Plugin, you can download Facebook SDK Grails - Shiro demo.

Documentation

Project documentation is located here :

Latest releases

WARNING: Since V0.4.0, FacebookApp, FacebookSdkFilters and FacebookAppService from V0.3.* are DEPRECATED and have been replaced by FacebookContext. Please check FacebookContext doc for more info.

  • 2012-12-05 V0.4.5 : bug fix in FacebookSignedRequest appData property
  • 2012-11-15 V0.4.4 : for photo/video publishing, FacebookGraphClient publish method accepts now InputStream argument type (instead of FileInputStream only)
  • 2012-10-29 V0.4.3 : tag lib improvements: channel integration (initJS tag and FacebookSdkController created), resources plugin integration (FacebookSdkResources created)
  • 2012-10-10 V0.4.2 : bug fix in batch responses error handling
  • 2012-09-25 V0.4.1 : bug fix in server side OAuth redirect
  • 2012-09-25 V0.4.0 : complete refactoring to improve SDK architecture (FacebookContext implemented) and multiple apps support added
  • 2012-09-03 V0.3.6 : latest RestFB 1.6.10 dependency, proxyHost and proxyPort added to config and signedRequest added to filter facebook map
  • 2012-08-24 V0.3.5 : proxyHost and proxyPort parameters added to Graph/Rest client (thanks to Eduard Martini)
  • 2012-07-23 V0.3.4 : bug fix in facebookAppService
  • 2012-07-17 V0.3.3 : readTimeout parameter added to Graph/Rest client + upgrade to Grails 2.1 with wrapper
  • 2012-06-12 V0.3.2 : bug fix in filter and plugin config
  • 2012-06-12 V0.3.1 : package grails.plugins.facebooksdk renamed to grails.plugin.facebooksdk
  • 2012-06-08 V0.3.0 : new documentation based on GDoc, FacebookRestClient added + bug fixes

Bugs

To report any bug, please use the project Issues section on GitHub.

Beta status

This is a beta release. The underlying APIs are generally stable, however we may make changes to the library in response to developer feedback.

Feedback

The Grails Facebook SDK is not an official Facebook SDK such as Javascript, PHP, iOS and Android SDKs.

It is developed by AgoraPulse.

The Grails Facebook SDK is licensed under the Apache Licence, Version 2.0.

Jump to Line
Something went wrong with that request. Please try again.