title: Facebook Marketing API: You are calling a deprecated version of the Ads API
body: <p>When trying to use the Facebook Marketing API I'm getting the error "you are calling a deprecated version of the Ads API. Please update to the latest version: v2.6.' even though on all code I'm using version 2.6.</p>
  
  <p>This is my code: (I've got the correct values in where the # is.</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  
  &lt;html lang = "en"&gt;
  
  &lt;head&gt;
  
  &lt;meta charset="utf-8"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  
  &lt;title&gt; Home &lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;script&gt;
        window.fbAsyncInit = function() {
          FB.init({
            appId      : '#',
            xfbml      : true,
            version    : 'v2.6'
          });
        };
  
        (function(d, s, id){
           var js, fjs = d.getElementsByTagName(s)[0];
           if (d.getElementById(id)) {return;}
           js = d.createElement(s); js.id = id;
           js.src = "//connect.facebook.net/en_US/sdk.js";
           fjs.parentNode.insertBefore(js, fjs);
         }(document, 'script', 'facebook-jssdk'));
      &lt;/script&gt;
  
  &lt;?php
  
  require_once('vendor/autoload.php');
  
  use FacebookAds\Api;
  use FacebookAds\Object\AdUser;
  use FacebookAds\Object\AdAccount;
  
  // Initialize a new Session and instanciate an Api object
  Api::init("#", "#", "#");
  
  // The Api object is now available trough singleton
  $api = Api::instance();
  
  
  $me = new AdUser('me');
  $my_adaccount = $me-&gt;getAdAccounts()-&gt;current();
  
  print_r($my_adaccount-&gt;getData());
  
  
  ?&gt;
  </code></pre>
  
  <p></p>