How can i save the facebook profile picture to my local folder using facebook graph api in codeigniter? -


i have sdk , facebook login working fine. getting user details without problem , problem profile picture.

if geting user profile image use following function work me

    $this->save_profile_photo($socialuser['image']);      function save_profile_photo($link) {         if ($link) {             $img = file_get_contents($link);             $imagename = "/profile" .  . '-' . date('y-m-d-h-i-s') . '.jpg';             $file = base_url(profile_image) . '/' . $imagename;             file_put_contents($file, $img);         }     } 

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -