I'm using the last versión of Modules.Facebook in Titanium. When I try to login a user the 'login' EventListener returns me this:
{"code":0,"data":"{\"name\":\"Guillermo Prueba\",\"userID\":\"454838701384823\",\"lastName\":\"Prueba\",\"firstName\":\"Guillermo\",\"middleName\":\"\",\"linkURL\":\"https:\/\/www.facebook.com\/app_scoped_user_id\/454838701384823\/\"}","uid":"454838701384823","success":true,"cancelled":false,"bubbles":true,"type":"login","source":{"id":"facebook"},"cancelBubble":false}
but I need the email too. Is this possible?
I'm putting the email permissions in the code but the response is the same.
fb.permissions = ['email'];
Solution founded!
fb.requestWithGraphPath("me?fields=name,email,first_name,last_name", {}, 'GET', function(e) {
var data = JSON.parse(e.result);
Ti.API.info("-- email: " + data.email);
});