我已经阅读了 Google 上的官方文档和大量文档。我想打印用户信息,但是当我运行我的代码时,我得到了这个:
Array
(
[id] => xxxx
[name] => Vinicius
[first_name] => Vinicius
[last_name] => M
[link] => http://www.facebook.com/xxx
[username] => vinicius
[birthday] => 01/04/1989
...
我的代码是,获取用户信息:
//if user is logged in and session is valid.
if ($user){
//get user basic description
$userInfo = $facebook->api("/$user");
并展示:
<?php d($userInfo); ?>
我想这样打印(或类似的东西):
Name: Vinicius
Last name: M
Birthday: 01/04/1989
我遵循了 Thinkdiff 教程。他们的很多代码。
嵌套数组怎么样?
[location] => Array (
[id] => 110703698957912
[name] => Campinas, Sao Paulo
)