facebook - PHP uploaded fb user's image isn't viewable? -


i'm working on fb login on site , have done except 1 weird problem. followed post , works fine except image uploaded empty.

what can cause corruption of image or how can fix issue? when download uploaded image on desktop, says we can't open file

$image = file_get_contents('https://graph.facebook.com/'.$fid.'/picture?type=large'); $dir = dirname(__file__).'/avatar/'.$fid.'.jpg'; file_put_contents($dir, $image); 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -