title: Twitter API responds with "Your credentials do not allow access to this resource" while calling statuses/update.json
body: <p>I'm using <a href="https://hybridauth.github.io/index.html" rel="noreferrer">Hybridauth</a> 3 in my PHP app to make some periodical tweets on behalf of my account.
  The app has all possible permissions. I'm giving it all permissions when it asks for them on the first auth step.
  After that Twitter redirects me to the specified callback URL and there I'm getting a pair of access_token and access_token_secret. 
  But when I'm trying to make a tweet using these tokens - it gives me:</p>
  
  <pre><code>{"errors":[{"code":220,"message":"Your credentials do not allow access to this resource."}]} 
  </code></pre>
  
  <p>Here's how I'm trying to make a tweet:</p>
  
  <pre><code>$config = [
      'authentication_parameters' =&gt; [
      //Location where to redirect users once they authenticate 
      'callback' =&gt; 'https://mysite/twittercallback/',
      //Twitter application credentials
      'keys' =&gt; [
              'key'     =&gt; 'xxx', 
              'secret' =&gt; 'yyy' 
      ],
      'authorize' =&gt; true
      ]
  ];
  
  $adapter = new Hybridauth\Provider\Twitter($config['authentication_parameters']);
  
  //Attempt to authenticate the user 
  $adapter-&gt;setAccessToken(/*tokens I've got from getAccessToken() on /twittercallback/*/);
  
  if(! $adapter-&gt;isConnected()) {
      // never goes here, so adapter is connected
      return null;
  }
  
  try{  
      $response = $adapter-&gt;setUserStatus('Hello world!');
  }
  catch (\Exception $e) {
      // here I've got the error
      echo $e-&gt;getMessage();
      return;
  }
  </code></pre>
  
  <p>Tried to recreate tokens and key\secret pairs and passed auth process for the app many times, including entering password for my Twitter account (as suggested in some posts on stackoverflow) but still have this error.</p>
  
  <p>P.S. According to <a href="https://stackoverflow.com/a/47635555/1571839">this</a>, Hybridauth has fixed the issue in the recent release.</p>