0

How to get birthday from facebook in android i am using android-simple-facebook library but its not working with its birthday permission.please guide me in the right direction.

Permission[] permissions = new Permission[] { Permission.EMAIL,
                Permission.USER_BIRTHDAY };
OnProfileListener onProfileListener = new OnProfileListener() {
            @Override
            public void onComplete(Profile profile) {
                Log.i("sampleFB", "My profile id = " + profile.getEmail());
                Log.i("sampleFB", "My profile id = " + profile.getGender());
                Log.i("sampleFB", "My profile id = " + profile.getFirstName());
                Log.i("sampleFB", "My profile id = " + profile.getLastName());
                Log.i("sampleFB", "My profile id = " + profile.getBirthday());
                // String str = Utils.toHtml(profile);
                // mResult.setText(Html.fromHtml(str));
            }

            /*
             * You can override other methods here: onThinking(), onFail(String
             * reason), onException(Throwable throwable)
             */
        };

        Profile.Properties properties = new Profile.Properties.Builder()
                .add(Properties.ID).add(Properties.FIRST_NAME)
                .add(Properties.EMAIL).add(Properties.BIRTHDAY).build();

        mSimpleFacebook.getProfile(onProfileListener);`
raktale
  • 465
  • 3
  • 12
  • try this: http://stackoverflow.com/questions/13984873/android-how-to-get-friends-birth-dates-from-facebook-calendar-using-graph-api?lq=1 – Miki Franko Nov 30 '14 at 12:05
  • thanks a lot for the quick reply @Miki Franko but i need to use the android-simple-facebook library to get the data. – raktale Nov 30 '14 at 12:15
  • did you try the "Simple Facebook SDK Sample" ? https://play.google.com/store/apps/details?id=com.sromku.simple.fb.example&hl=en – Miki Franko Nov 30 '14 at 12:36
  • I tried the sample but it doesn't have any information related to birthday – raktale Nov 30 '14 at 12:42

0 Answers0