lib/facebook.js
function(user, permissions, options) {
      if (!permissions || _.isString(permissions)) {
        if (!initialized) {
          throw "You must initialize FacebookUtils before calling link.";
        }
        requestedPermissions = permissions;
        return user._linkWith("facebook", options);
      } else {
        var newOptions = _.clone(options) || {};
        newOptions.authData = permissions;
        return user._linkWith("facebook", newOptions);
      }
    }
function(user, permissions, options) {
      if (!permissions || _.isString(permissions)) {
        if (!initialized) {
          throw "You must initialize FacebookUtils before calling link.";
        }
        requestedPermissions = permissions;
        return user._linkWith("facebook", options);
      } else {
        var newOptions = _.clone(options) || {};
        newOptions.authData = permissions;
        return user._linkWith("facebook", newOptions);
      }
    }
function ( user , permissions , options ) { if ( ! permissions || _ . isString ( permissions ) ) { if ( ! initialized ) { throw "You must initialize FacebookUtils before calling link." ; } requestedPermissions = permissions ; return user . _linkWith ( "facebook" , options ) ; } else { var newOptions = _ . clone ( options ) || { } ; newOptions . authData = permissions ; return user . _linkWith ( "facebook" , newOptions ) ; } }
Links Facebook to an existing PFUser. This method delegates to the
Facebook SDK to authenticate the user, and then automatically links
the account to the Parse.User.

@param {Parse.User} user User to link to Facebook. This must be the
current user.
@param {String, Object} permissions The permissions required for Facebook
log in.  This is a comma-separated string of permissions.
Alternatively, supply a Facebook authData object as described in our
REST API docs if you want to handle getting facebook auth tokens
yourself.
@param {Object} options Standard options object with success and error
callbacks.
Links Facebook to an existing PFUser . This method delegates to the Facebook SDK to authenticate the user and then automatically links the account to the Parse . User .