Search code examples
phplinkedin-api

Linkedin API returns unknown field in resource person


so I'm fairly new with working in Linkedin API, I'm trying to fetch details of r_basicprofile, but I get this error.

Unknown field {position} in resource {Person}

Here's my code :-

$xml_response = $linkedin->getProfile("~:(id,email-address,num-connections,industry,position)");

What wrong am I doing?


Solution

  • The column position should be positions

    Try

    $xml_response = $linkedin->getProfile("~:(id,email-address,num-connections,industry,positions)");
    

    That will return a list of position objects