2013-07-29 87 views

回答

0

試試這個,

如果您正在使用FB SDK的PHP

  $path = realpath('.'); 
     require_once($path."/facebook/fbmain.php"); 

     $user  = $facebook->getUser(); 


//  print_r($user); 
//  echo "user<br/>"; 
//  print_r($userInfo); 
//   echo "<br/>Info<br/>"; 
//   print_r($fqlResult); 
//   foreach($fqlResult as $key=>$value){ 
//    print_r($value); 
//    echo '<br>'; 
//   } 
//  exit; 

     if ($user){ 


       $fname  = $userInfo['first_name']; 
       $last_name = $userInfo['last_name']; 
       $username = $userInfo['id']; 
       $dob   = date("d-m-Y",strtotime($userInfo['birthday'])); 
       foreach($fqlResult as $key=>$value); 

       $user_email  = $value['email']; 
       $profile_image = $value['pic_square']; 
       $sex    = $value['sex']; 
       $city   = $value['hometown_location']['city']; 
       $state   = $value['hometown_location']['state']; 
       $country   = $value['hometown_location']['country']; 
       $zip    = $value['hometown_location']['zip']; 

       //Then simply call model and write save db query. 
       $model = $this->getModel('Registration', 'UsersModel'); 

}

0

你想使一個FB認證插件,然後有數據傳遞關閉到的Joomla用戶插件如果可能的話。如果你想使用不同的用戶表,你也需要製作自己的用戶插件。 Joomla認證首先認證(認證插件),然後作者,然後登錄(用戶插件)

相關問題