Get information about the Facebook user with the specified access token.
var FacebookHnrykf = require('machinepack-facebook-hnrykf');
// Get information about the Facebook user with the specified access token.
FacebookHnrykf.getUserByAccessToken({
access_token: 'CA2Emk9XsJUIBAHB9sTF5rOdNmAXTDjiHxZaZC1GYtFZCcdYGVnLYZB7jZCvensIpGc22yEzN6CL6wtQ9LPVXTNkuP6eQoUQ0toEVPrmTTqDpj0POijBpsuZBnx7jrZCHaTw8leiZBn0R8u6gZAYZAuD77cA3tnDMYvHhrl42CnljROeC9maWoa5zbsT2TZBXdL9wEuGQDSxKqRPyajRw3P3HEK',
fields: 'email, first_name, last_name, gender, picture, link, locale, name',
}).exec({
// An unexpected error occurred.
error: function (err) {
},
// OK.
success: function (result) {
},
});
The access token which allows you to do things and get information on behalf of a particular Facebook user.
'CA2Emk9XsJUIBAHB9sTF5rOdNmAXTDjiHxZaZC1GYtFZCcdYGVnLYZB7jZCvensIpGc22yEzN6CL6wtQ9LPVXTNkuP6eQoUQ0toEVPrmTTqDpj0POijBpsuZBnx7jrZCHaTw8leiZBn0R8u6gZAYZAuD77cA3tnDMYvHhrl42CnljROeC9maWoa5zbsT2TZBXdL9wEuGQDSxKqRPyajRw3P3HEK'
The fields to be requested to the API. Needs to be a comma separated string. If not send, will return only name and id
'email, first_name, last_name, gender, picture, link, locale, name'
An unexpected error occurred.
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 }