0

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.'); } } ?> 
2
Contributors
1
Reply
7
Views
1 Year
Discussion Span
Last Post by cereal
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.