Closed jesusmartinoza closed 7 years ago
Hey Jesús!
This looks nice. A problem with adding the usage of the Graph API is that the code starts to deviate too much from the tutorial. The intention of #35 was to add some JavaScript functions that take the AccessToken
as argument and return some of the fields from that, while here you're doing something slightly different.
Perhaps a better idea would be for you to maintain this extended version of the example in a separate repository that we could then link to from this one?
Cheers!
Oh I understand. Maybe another option is use the user object as second parameter like this...
var FacebookLogin = require("FacebookLogin");
FacebookLogin.login().then(function(accessToken, user) {
console.log(JSON.stringify(user));
//{"id":"XXXXXXXXX","email":"XXXX@hotmail.com","name":"Jesus Martínez"}
}, function(err) {
console.log("Login failed: " + err);
});
Anyway the extended version in a separate repository is OK for me. (:
Get user info using GrapRequest in Android and iOS