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

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

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

html - jQuery UI Sortable - Remove placeholder after item is dropped -