Reputation: 16120
In my app, I have allowed users to signup through Facebook. When user logged in, I get access token. Now I want to get email address of the user. How to get that?
Upvotes: 3
Views: 3873
Reputation: 11107
First of all add permission
public static final String[] PERMISSIONS = new String[] {"email"};
String response=authenticatedFacebook.request("me");
JSONObject obj = Util.parseJson(response);
useremail=obj.getString("email");
where authenticatedFacebook is Facebook object.
Util will available along with Facebook SDK.
Ensure that you gave Email permission.
Upvotes: 9