Facebook.getUserByAccessToken()

Get information about the Facebook user with the specified access token.

Usage

Hover over inputs/exits for more info.

var Facebook = require('machinepack-facebook');


// Get information about the Facebook user with the specified access token.

Facebook.getUserByAccessToken({

accessToken: 'CA2Emk9XsJUIBAHB9sTF5rOdNmAXTDjiHxZaZC1GYtFZCcdYGVnLYZB7jZCvensIpGc22yEzN6CL6wtQ9LPVXTNkuP6eQoUQ0toEVPrmTTqDpj0POijBpsuZBnx7jrZCHaTw8leiZBn0R8u6gZAYZAuD77cA3tnDMYvHhrl42CnljROeC9maWoa5zbsT2TZBXdL9wEuGQDSxKqRPyajRw3P3HEK',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

accessToken required

The access token which allows you to do things and get information on behalf of a particular Facebook user.

'CA2Emk9XsJUIBAHB9sTF5rOdNmAXTDjiHxZaZC1GYtFZCcdYGVnLYZB7jZCvensIpGc22yEzN6CL6wtQ9LPVXTNkuP6eQoUQ0toEVPrmTTqDpj0POijBpsuZBnx7jrZCHaTw8leiZBn0R8u6gZAYZAuD77cA3tnDMYvHhrl42CnljROeC9maWoa5zbsT2TZBXdL9wEuGQDSxKqRPyajRw3P3HEK'

Exits

error

An unexpected error occurred.

success

OK.

{ id: '7653384',
  email: 'foobar@gzail.com',
  first_name: 'Brendan',
  gender: 'female',
  last_name: 'Eich',
  link: 'http://www.facebook.com/7653384',
  locale: 'en_US',
  name: 'Brendan Eich',
  timezone: -6,
  updated_time: '2014-08-16T12:07:43+0000',
  verified: true }