-1

我需要转储我正在使用此代码的应用程序用户的一些信息!

$fbme     =   $facebook->api('/me');
$str = $fbme['name'].' '.$fbme['sex'].' '.$fbme['hometown_location'].' '.$fbme['profile_url'].'\r\n';
$fp = fopen("data.txt", "w");
fwrite($fp, $str);
fclose($fp);

但这仅显示名称,没有其他内容!为什么 ?

4

2 回答 2

5

你正在编造财产名称。不是性,是性。等等。阅读:http: //developers.facebook.com/docs/reference/api/user/

于 2011-04-11T15:53:38.217 回答
0
    $friends = $facebook->api('me/friends');

    //print_r($friends['data']);
    print_r("Number of friends: ". count($friends['data']));

    foreach ($friends['data'] as $key=>$friendList) {
        echo "<br/>".$key." ".$friendList['name']."<img src='https://graph.facebook.com/".$friendList['id']."/picture' width='50' height='50' title='".$friendList['name']."' />";     
    }
于 2012-06-15T15:46:18.690 回答