Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot fetch user->position->company id #129

Open
GoogleCodeExporter opened this issue May 1, 2015 · 1 comment
Open

Cannot fetch user->position->company id #129

GoogleCodeExporter opened this issue May 1, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Get a user's profile:
    Set<ProfileField> fields =
            EnumSet.of(
                    ProfileField.FIRST_NAME,
                    ProfileField.LAST_NAME,
                    ProfileField.DATE_OF_BIRTH,
                    ProfileField.HEADLINE,
                    ProfileField.LOCATION,
                    ProfileField.INDUSTRY,
                    ProfileField.SUMMARY,
                    ProfileField.SPECIALTIES,
                    ProfileField.EDUCATIONS,
                    ProfileField.POSITIONS_COMPANY,
                    ProfileField.POSITIONS_COMPANY_ID,
                    ProfileField.POSITIONS_COMPANY_INDUSTRY,
                    ProfileField.POSITIONS_COMPANY_NAME,
                    ProfileField.POSITIONS_COMPANY_SIZE,
                    ProfileField.POSITIONS_COMPANY_TYPE,
                    ProfileField.POSITIONS_ID,
                    ProfileField.POSITIONS_IS_CURRENT,
                    ProfileField.POSITIONS_SUMMARY,
                    ProfileField.POSITIONS_TITLE
            );
     Person person = client.getProfileById(id, fields);
     Positions li_positions = person.getPositions();
      if (li_positions != null)
            for (Position position : li_positions.getPositionList())
                   System.out.println(position.getCompany().getId()); //Always null

This will always be null, rather than the company ID

LinkedInJ version:1.0.416
Platform: Java 7; 32b ubuntu

Original issue reported on code.google.com by [email protected] on 28 Nov 2012 at 2:59

@GoogleCodeExporter
Copy link
Author

Never mind, I fixed this. Companies do not need to have IDs, when they don't 
have a linkedin page, they will not have an ID. This is often the case for 
small firms without a linkedin presence.

Original comment by [email protected] on 28 Nov 2012 at 4:28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant