Hi i get all information what i need but i dont know how to get facebook profile image and save to file and in mysql save path. Here is my code for call fb api :

<?php session_start(); include_once("config.php"); // facebook id include_once("includes/functions.php"); //destroy facebook session if user clicks reset if(!$fbuser){ $fbuser = null; $loginUrl = $facebook->getLoginUrl(array('redirect_uri'=>$homeurl,'scope'=>$fbPermissions)); echo '<a href="'.$loginUrl.'"><img src="images/fb_login.png"></a>'; }else{ $user_profile = $facebook->api('/me?fields=id,first_name,last_name,email,gender'); $user = new Users(); $user_data = $user->checkUser('facebook',$user_profile['id'],$user_profile['first_name'],$user_profile['last_name'],$user_profile['email'],$user_profile['gender']); if(!empty($user_data)){ $_SESSION['userdata'] = $user_data; header("Location:account.php"); }else{ die('Some problem occurred, please try again.'); } } ?> 
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.