Search code examples
iosswiftlinkedin-api

Unable to fetch Email and profile pic from installed Linkedin app


I am trying to fetch Linkedin User's following details like Name, email-id, profilePic, id.

I am able to fetch all the details except email-id and profilePic.

Fetching details via Linkedin url

{
    firstName = Apple;
    formattedName = "Apple Live";
    id = 7uRZgpgwgO;
    lastName = Live;
    picture_url = "" ;
    email-id = "[email protected]"
}

Fetching details via Linkedin app

{
    firstName = Apple;
    formattedName = "Apple Live";
    id = 7uRZgpgwgO;
    lastName = Live;
}

Linkedin app code

LISDKAPIHelper.sharedInstance().getRequest("https://api.linkedin.com/v1/people/~:(id,first-name,last-name,maiden-name,email-address,picture-url,formattedName)?format=json", success: {
     }

Solution

  • The following code solved my issue

    To get email address via app:

    [LISDK_BASIC_PROFILE_PERMISSION,LISDK_EMAILADDRESS_PERMISSION]

    To get Profile Pic:

    picture-urls::(original)