title: LinkedIn with Pecl OAuth: "got a 400, expected HTTP/1.1 20X or a redirect"
body: <p>I have Pecl OAuth with PHP5 on a Debian box and I try to authenticate to LinkedIn. When calling;</p>
  
  <p>OAuth->getAccessToken('<a href="https://api.lin" rel="nofollow noreferrer">https://api.lin</a>...')\n#1</p>
  
  <p>I get; </p>
  
  <p>PHP Fatal error:  Uncaught exception 'OAuthException' with message 'Invalid auth/bad request (got a 400, expected HTTP/1.1 20X or a redirect)'</p>
  
  <p>I have tried it from scratch and I have tried the PHP API wrappers that are available and (ofcourse, because they use OAuth Pecl ext) have all the same problem. </p>
  
  <p>I read somewhere it might be the timestamp on the server, but I synched that up with ntpdate; it does that quite often now, so the offset with the timeservers is almost 0. </p>
  
  <p>I tried this class first; <a href="http://www.linkedphp.com/2009/11/26/first-release-classes-to-connect-with-php-to-linkedin-api/" rel="nofollow noreferrer">http://www.linkedphp.com/2009/11/26/first-release-classes-to-connect-with-php-to-linkedin-api/</a>, someone in the comments has the same problem, however the creator of the class says 'do you get a login screen'; I don't, I get a 'Grant or Deny' screen once, after that a blank screen and the above error in my logs.</p>
  
  <p>What else can it be? </p>
  
  <p>Thanks</p>