Is there a way to know if the logged in user (through linkedin) is/has a company associated ?
I need to allow access to my app only linkedin companies. How can I validate if the logged in user is a linkedin company or a regular user ?
Is there a way to know if the logged in user (through linkedin) is/has a company associated ?
I need to allow access to my app only linkedin companies. How can I validate if the logged in user is a linkedin company or a regular user ?
The LinkedInProfile
class only contains the basic profile information which does not help in distinguishing if the logged in user is a regular user or company. This class extends LinkedInObject
which contains extraData
property for carrying any data in response from LinkedIn that won't be otherwise mapped to any properties of the subclass.
The getExtraData
method returns a Map<String, Object>
which contains the extra information. In this Map check if company-type
key is available, if YES then you can conclude that the logged in user is of type Company.
The possible values of company-type
are: