A simple way to interact with Facebook's Graph API using Backbone.js objects.
bower install backbone.api.facebook
- Facebook JS: all
The plugin will try to create a global namespace Facebook
that will host all the Models/Views/Collections mirrored from Backbone.API.Facebook
When the web page is loaded, passing the appId
and uri
for reference in the api requests
Facebook.set({
appId: 345644234546,
uri: "namespace"
});
Most Backbone.js conventions apply using the Facebook namespace.
var friends = new Facebook.Collections.Friends();
var me = new Facebook.Models.Me();
Facebook's UI is treated as the template method for the Views
var post = new Facebook.Models.Post();
var view = new Facebook.Views.Post({ model : post, callback : MyFunction });
Created by Makis Tracend ( @tracend )
Login/logout inspired by facebook-user.js - Copyright (c) 2010 Christian Bäuerlein
Originally used for havenbase.com
Distributed through Makesites.org
Released under the MIT license