android-simple-facebook icon indicating copy to clipboard operation
android-simple-facebook copied to clipboard

How to get information of the user ?

Open bagusflyer opened this issue 10 years ago • 2 comments

I'd like to get information of the user such as user name, email address, picture etc. What can I do?

I tested by using "get account" function in your demo. The size of List<Account> returned is zero. Here is my configuration:

    // initialize facebook configuration
    Permission[] permissions = new Permission[] {
            Permission.PUBLIC_PROFILE,
            Permission.PUBLISH_ACTION
    };

    SimpleFacebookConfiguration configuration = new SimpleFacebookConfiguration.Builder()
            .setAppId(getResources().getString(R.string.app_id))
            .setNamespace(getResources().getString(R.string.app_name))
            .setPermissions(permissions)
            .setDefaultAudience(SessionDefaultAudience.EVERYONE)
            .setAskForAllPermissionsAtOnce(false)
            .build();

    SimpleFacebook.setConfiguration(configuration);

Did I do anything wrong or I have to use other method? Thanks

bagusflyer avatar Feb 05 '15 02:02 bagusflyer

Any idea? Thanks

bagusflyer avatar Feb 25 '15 09:02 bagusflyer

Hi hope it is not late nothing is wrong except the fact that you just setup the client you need now to write the piece of code that will give you the needed information

check out this https://github.com/sromku/android-simple-facebook/wiki/Get-profile

and don't forget to login in first

konigsoft avatar May 22 '15 17:05 konigsoft