0

I am using 3pillars social auth library for android .

How do I get the users company and designation . Currently I am trying to use

String firstName=profile.getFirstName();
String lastName=profile.getLastName();
String email=profile.getEmail();
profile.getContactInfo();

I am getting null for profile.getContactInfo();

karthik kolanji
  • 2,044
  • 5
  • 20
  • 56

1 Answers1

0

Check this Android LinkedIn integration and Following code may help you

try {

            final Person user_Profile = client.getProfileForCurrentUser(EnumSet.of(ProfileField.ID)); 
            person = client.getProfileById(user_Profile.getId(), EnumSet.of(
                    ProfileField.FIRST_NAME,
                    ProfileField.LAST_NAME,
                    ProfileField.PICTURE_URL,
                    ProfileField.INDUSTRY,
                    ProfileField.MAIN_ADDRESS,
                    ProfileField.HEADLINE,
                    ProfileField.SUMMARY,
                    ProfileField.POSITIONS,
                    ProfileField.EDUCATIONS,
                    ProfileField.LANGUAGES,
                    ProfileField.SKILLS,
                    ProfileField.INTERESTS,
                    ProfileField.PHONE_NUMBERS,
                    ProfileField.EMAIL_ADDRESS,
                    ProfileField.DATE_OF_BIRTH,
                    ProfileField.PUBLIC_PROFILE_URL));


            prof_name       = person.getFirstName() + " "   + person.getLastName();
            prof_headline   = person.getHeadline();
            prof_location   = person.getMainAddress();
            prof_industry   = person.getIndustry();


            return person;

        } catch (LinkedInApiClientException ex) {
            return ex;
        }
mdDroid
  • 3,135
  • 2
  • 22
  • 34