I have used following code to save the facebook profile pic by url provided by facebbok
$data = file_get_contents('https://graph.facebook.com/[App-Scoped-ID]/picture?width=378&height=378&access_token=[Access-Token]');
$file = fopen('fblogo/fbphoto.jpg', 'w+');
fputs($file, $data);
fclose($file);
The image saved on desired place but it saved by 0 byte means corrupt, please let know how to save the image properly