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 ?
Copyright © 2021 Jogjafile Inc.
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 extendsLinkedInObject
which containsextraData
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 aMap<String, Object>
which contains the extra information. In this Map check ifcompany-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: