-
How to get facebook profile picture by Facebook App
over 5 years ago
-
almost 5 years ago
Hello Friend,
Please review function getUserPicture(), I have made a AJAX call in this function
$.post("saveimages", { url: response.data.url, fid: user_id }
I am using Codelgniter framework to save this profile picture on server, you can make your changes accordingly.
public function saveimages(){ $url = $this->input->post('url'); $fid = $this->input->post('fid');
// SERVER URL TO SAVE IMAGE $save_image_path = public_path.'uploads/userprofilepics/'.$fid.'_profilepic.jpg'; // REPLACE THIS PATH WITH YOUR SERVER PATH TO SAVE PROFILE PIC
$source_image = file_get_contents($url); file_put_contents($save_image_path, $source_image); }
-
-
almost 5 years ago
How do we save the image to a folder on the server..?
-
2 Comment(s)