Facebook SDK Grails Plugin
Groovy Java Shell
Latest commit 3a735a5 Jan 2, 2017 @benorama benorama README update
Permalink
Failed to load latest commit information.
gradle/wrapper [Chore] Grails upgraded to 3.2.1 Oct 20, 2016
grails-app Merge remote-tracking branch 'origin/master' into grails3 Aug 31, 2016
src Minor fix in Cookie scope when using localhost Dec 20, 2016
.gitignore Initial commit for Grails 3.0.0 migration Mar 8, 2015
.travis.yml Travis config update Oct 20, 2016
README.md README update Jan 2, 2017
build.gradle Version bumped to 2.7.2 Dec 20, 2016
gradle.properties Grails upgraded to 3.2.2 Nov 7, 2016
gradlew
gradlew.bat
settings.gradle Gradle wrapper update Jul 7, 2016
travis-publish.sh Travis config update Oct 20, 2016

README.md

Facebook SDK Grails Plugin

Build Status Download

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 to Grails 3.0.

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

Grails Facebook SDK Plugin provides the following Grails artefacts:

WARNING: Facebook API v2.7 is now used by default.

Installation

Declare the plugin dependency in the build.gradle file, as shown here:

dependencies {
    ...
    compile "org.grails.plugins:facebook-sdk:2.7.2"
    ...
}

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/application.yml:

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

By default, latest Graph API v2.6 will be used. You can override default settings with apiVersion setting:

grails:
    plugin:
        facebooksdk:
            apiVersion: v2.3

Since FacebookContext should be instantiated at each request, you must use prototype scope for your Controllers (since Grails 2.3, singleton is the default scope).

grails:
    controllers:
        defaultScope: prototype

Default jQuery selector is $, if you require another one, you can define it globally in your grails-app/conf/application.groovy:

grails:
    plugin:
        facebooksdk:
            customSelector: jQuery

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.

Documentation

Project documentation is located here :

Bugs

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

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.