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
LinkedInProfileclass 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 extendsLinkedInObjectwhich containsextraDataproperty for carrying any data in response from LinkedIn that won't be otherwise mapped to any properties of the subclass.The
getExtraDatamethod returns aMap<String, Object>which contains the extra information. In this Map check ifcompany-typekey is available, if YES then you can conclude that the logged in user is of type Company.The possible values of
company-typeare: