2013-07-29 54 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认证首先认证(认证插件),然后作者,然后登录(用户插件)

相关问题