Android Setting permissions to access data from the Facebook profile


Example

If you want to retrieve the details of a user's Facebook profile, you need to set permissions for the same:

loginButton = (LoginButton)findViewById(R.id.login_button);

loginButton.setReadPermissions(Arrays.asList("email", "user_about_me"));

You can keep adding more permissions like friends-list, posts, photos etc. Just pick the right permission and add it the above list.

Note: You don't need to set any explicit permissions for accessing the public profile (first name, last name, id, gender etc).