Facebook SDK wrapper for AngularJS Apps.
Currently under active development.
This project uses grunt for tooling. To build, navigate to the root directory and run
grunt build. To run the tests run
Currently supported features of the Facebook SDK:
- User Authentication (login, logout etc)
- Graph API
Include the module in your app and initialise it during the application config block in the same manner you would initialise the FB SDK:
FB. Calls are the same as to the traditional
FB object, except that they use promises instead of callbacks.
The one exception to this is
$facebook.getAuthResponse which is synchronous.
Events from the facebook SDK are then broadcast through the $rootScope of the application. The naming convention is to use the same event name as the Facebook SDK, prepended with 'facebook.' - so 'auth.authResponseChange' is broadcast as 'facebook.auth.authResponseChange. Consume these events as you would any other angular event: