Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.8 KB

readme.md

File metadata and controls

42 lines (26 loc) · 1.8 KB

FB Connect JS SDK with external datasources

This is a fork of the Facebook Connect JavaScript SDK with support for connecting to other graph data sources than Facebook. This readme will explain what is added to the Facebook SDK. Please see Facebook Connect JavaScript SDK for details on all the rest of the library.

This version of connect.js allows you to connect to other datasources than facebook through the graph API. Set up a database server that follows the FB graph standard, and this API can talk to it.

Usage

Initiate connect.js with the "external_domains" parameter:

FB.init({
    appId  : 'YOUR APP ID',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true, // parse XFBML

    external_domains : {
        myserver : 'http://graph.example.com/'
    }

});

Access your external domain through namespacing the api paths:

FB.api('myserver:/path/to/data', function(response) {
    
});

The namespace "fb:" is available by default for consistency. If you do not provide a namespace the SDK behaves the same as the standard facebook connect.js.

Getting a server running

There is currently work beeing done on a beta backend server that wraps a Neo4j graph database and exposes its data the same way facebook does. It should be available shortly.

Using a full blood graph database like Neo4j enables you to fully benifit from using the graph API. A graph database backend opens the possibility for more advanced paths (such as XPath) in the future.