title: Facebook return an URL of image to download
body: <p>I am trying to develop a login to my website functionality with Facebook account using Facebook Graph API.</p>
  
  <p>I am in trouble to retrieve profile image of logged in user because Facebook returns URL but when I try it on the navigator it says that it needs permission to download it.</p>
  
  <p>For example the URL: </p>
  
  <blockquote>
    <p><a href="https://platform-lookaside.fbsbx.com/platform/profilepic/?asid" rel="nofollow noreferrer">https://platform-lookaside.fbsbx.com/platform/profilepic/?asid</a>......</p>
  </blockquote>
  
  <p>PS : I make the 3 points </p>
  
  <p>I want to know if there is any method to get a correct URL to save it in the database or if there is any method to download the image with PHP, I tried this on my end, but no success.</p>
  
  <pre><code>$img = file_get_contents($dataata['picture']['url']);          
  $file = '/img/test.jpg';
  file_put_contents($file, $img);
  </code></pre>
  
  <p>Message returned is :</p>
  
  <blockquote>
    <p>file_put_contents(/img/test.jpg): failed to open stream: No such file
    or directory</p>
  </blockquote>
  
  <p>Any solution? </p>