我需要为学校制作一个Facebook应用程序。 是否可以检索登录的人的姓名并将其放入数组中? 我正在使用actionscript 3.0制作这个应用程序
答案 0 :(得分:-1)
使用Facebook PHP-SDK
$facebook = new Facebook(array(
'appId' => 'Your_app_id',
'secret' => 'Your_app_Secret',
'cookie' => true,
));
// Getting friends list
$friends = $facebook->api('/me/friends');
foreach ($friends as $friends1) {
foreach ($friends1 as $friend) {
$id = $friend['id'];
$name = $friend['name'];
}
}