title: Facebook - get profile picture php sdk
body: <p>Until few months ago I was using this method to get the user's facebook profile picture and was working fine.</p>
  
  <pre><code>public function getUserProfilePic(){
     $access_token = $this-&gt;facebook_obj-&gt;getAccessToken();
     $user_id = $this-&gt;facebook_obj-&gt;getUser();
     $response = $this-&gt;facebook_obj-&gt;api(
        "/me/picture",
        "GET",
        array (
          'redirect' =&gt; false,
          'type'     =&gt; 'large'
        )
     );
     return (!empty($response['data']['url'])) ? $response['data']['url'] : 'images/default_profile.jpg';
  }
  </code></pre>
  
  <p>But since the new PHP SDK I have some problems with this method. If I afk for 5 minutes on the main menu on my app and than go on the click to go the page where it calls this method I get </p>
  
  <blockquote>
    <p>"OAuthException : An active access token must be used to query information about the current user" error.</p>
  </blockquote>
  
  <p>Any thoughts?</p>