I am trying to develop a login to my website functionality with Facebook account using Facebook Graph API.
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.
For example the URL:
https://platform-lookaside.fbsbx.com/platform/profilepic/?asid......
PS : I make the 3 points
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.
$img = file_get_contents($dataata['picture']['url']);
$file = '/img/test.jpg';
file_put_contents($file, $img);
Message returned is :
file_put_contents(/img/test.jpg): failed to open stream: No such file or directory
Any solution?