Skip to content

Latest commit

 

History

History
57 lines (35 loc) · 1.32 KB

readme.md

File metadata and controls

57 lines (35 loc) · 1.32 KB

Backbone API : Facebook

A simple way to interact with Facebook's Graph API using Backbone.js objects.

Install

bower install backbone.api.facebook

Dependencies

  • Facebook JS: all

Usage

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"
});

Common 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 });

Credits

Initiated by Makis Tracend ( @tracend )

Distributed through Makesites.org

Trivia

License

Released under the MIT license