PHP错误:facebook connect - 不能将字符串偏移量用作数组

时间:2012-07-25 12:14:09

标签: php facebook

这是错误:Cannot use string offset as an array in line 41

第41行是:$data['first_name'] = $user_details[0]['first_name'];

这是代码:

$user_details = $facebook->api_client->users_getInfo($authData["uid"], 'first_name,last_name,pic_square,email'); 

$data['first_name'] = $user_details[0]['first_name'];
$data['last_name'] = $user_details[0]['last_name']; 
$data['pic'] = $user_details[0]['pic_square']; 
$data['email'] = $user_details[0]['email']; 
$data['uid'] = $user_details[0]['uid']; 
easyRegister($data['uid'],$data['first_name'],$data['last_name'],$data['email'],$data['pic'],1);

0 个答案:

没有答案