title: Linkedin API - get full data
body: <p>I try to make an script to get data from LINKEDIN, i am able to get many of information about profile like name, mail, phone, picture url and so on, unfortunately how ever I try I can't get to informations like work experience and many other. </p>
  
  <p>My Request looks like:</p>
  
  <pre><code>   $xml_response = $linkedin-&gt;getProfile("~:(id,first-name,last-name,interests,publications,patents,languages,skills,date-of-birth,email-address,phone-numbers,im-accounts,main-address,twitter-accounts,headline,picture-url,public-profile-url)");
  </code></pre>
  
  <p>This work correctly, but lets try to add companies</p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>I added it at the end of  <code>$linkedin-&gt;getProfile</code> and here is the
    error message what I get:</p>
    
    <p>[message] => Unknown field {companies} in resource {Person}</p>
  </blockquote>
  
  <p>Full function looks like:</p>
  
  <pre><code>public function linkedinGetUserInfo( $requestToken='', $oauthVerifier='', $accessToken=''){
      include_once 'linkedinoAuth.php';
  
      $linkedin = new LinkedIn($this-&gt;config['linkedin_access'], $this-&gt;config['linkedin_secret']);
      $linkedin-&gt;request_token    =   unserialize($requestToken); //as data is passed here serialized form
      $linkedin-&gt;oauth_verifier   =   $oauthVerifier;
      $linkedin-&gt;access_token     =   unserialize($accessToken);
  
      try{
          $xml_response = $linkedin-&gt;getProfile("~:(id,first-name,last-name,interests,publications,patents,languages,skills,date-of-birth,email-address,phone-numbers,im-accounts,main-address,twitter-accounts,headline,picture-url,public-profile-url,educations,companies)");
      }
      catch (Exception $o){
          print_r($o);
      }
      return $xml_response;
  }
  </code></pre>
  
  <p>Documentation I found (but didn't help me ) 
  <br>
  <a href="https://developer.linkedin.com/docs/fields" rel="nofollow">https://developer.linkedin.com/docs/fields</a></p>
  
  <p>I expect I miss something really stupid but cant figurate it out, can somone help me?</p>