title: Use of undefined constant OAUTH_AUTH_TYPE_URI
body: <p>I'm trying to connnect with Magento 1.7 API, but I'm getting this error:</p>
  
  <pre><code>Notice: Use of undefined constant OAUTH_AUTH_TYPE_URI - assumed 'OAUTH_AUTH_TYPE_URI' 
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>try {
      $authType = ($_SESSION['state'] == 2) ? OAUTH_AUTH_TYPE_AUTHORIZATION : OAUTH_AUTH_TYPE_URI;
      $oauthClient = new OAuth($consumerKey, $consumerSecret, OAUTH_SIG_METHOD_HMACSHA1, $authType);
      $oauthClient-&gt;enableDebug();
  }
  </code></pre>
  
  <p>I'm following <a href="http://devdocs.magento.com/guides/m1x/api/rest/introduction.html" rel="nofollow noreferrer">this guide</a></p>
  
  <p>I tried installing oauth with composer:</p>
  
  <pre><code>{
      "require": {
          "lusitanian/oauth": "1.0.*@dev"
      }
  }
  </code></pre>
  
  <p>And I added OAuth to php.ini and restarted Apache as the <a href="https://magento.stackexchange.com/questions/25447/getting-started-with-magento-rest-api">answer in this post</a></p>
  
  <pre><code>;extension=oauth.so
  </code></pre>
  
  <p>But I'm still getting the same error.</p>
  
  <p>How can I fix this? </p>