Skip to content
Wraps the Facebook Javascript SDK in a warm, loving, jQuery-ish embrace
JavaScript Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
config
lib
public
script
spec
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
config.ru
facehugger.gemspec

README.md

Facehugger

Wraps the Facebook Javascript SDK in a warm, loving, jQuery-ish embrace.

Download

jquery.facehugger.js

Usage

// Init

$.fb.init({ app_id: 'YOUR APP ID', status: true }, function() {
  
  $.fb
  
    // Status

    .status(function(response) {
      console.log(response);
    })

    .status('connected', function() { console.log('connected'); })
    .status('not_connected', function() { console.log('not connected'); })
    .status('unknown', function() { console.log('unknown'); })

    .status()

    // Login
  
    .login('publish_stream', function() {
      
      $.fb
    
        // API
    
        .api('/me', function(response) {
          console.log(response);
        })
    
        // Cached API
    
        .cachedAPI('/me', [ 'id', 'name' ], function(response) {
          console.log(response);
        })
    
        // Logout
    
        .logout(function() {
          console.log('logged out');
        });
    });
});
Something went wrong with that request. Please try again.