title: Fatal error: Call to a member function setAccessToken() on a non-object in
body: <p>I'm getting:</p>
  
  <p>Fatal error: Call to a member function setAccessToken() on a non-object in</p>
  
  <p>In this line: </p>
  
  <pre><code>$fbObj-&gt;setAccessToken($token-&gt;access_token);
  </code></pre>
  
  <p>And this is the function: </p>
  
  <pre><code>  public function setAccessToken($accessToken)
    {
  
       $this-&gt;accessToken = $accessToken;
  
    }
  </code></pre>
  
  <p>Where's the error? </p>
  
  <p>Thanks  a lot</p>