1
公式のPHP-Facebook-Apiを使用しています。ユーザーのフレンドリストを取得する方法を知っています。それはとても似基本的には次のとおりです。PHP/Facebook-API:フレンドリストを更新
$facebook = new Facebook(array(
'appId' => 'xxxxxxxx',
'secret' => 'xxxxxxx',
'cookie' => true,
));
// $session is only != null, when you have the session-cookie, that is set by facebook, after the user logs in
$session = $facebook->getSession();
// you dont get a list of friends, but a list, which contains other friendlists
$friendsLists = $facebook->api('/me/friends');
// Save all Friends and FriendConnections
foreach ($friendsLists as $friends) {
foreach ($friends as $friend) {
// do something with the friend, but you only have id and name
$id = $friend['id'];
$name = $friend['name'];
}
}
私のアプリケーションでは、私は、ユーザーのすべての友達を表示するHTTP要求を毎回作る持っていけないように、私は基本的に、私のデータベース内のすべての友人を保存します。しかし今、Friendlistを更新したいと思います。私はすべての友人接続を削除し、それらをもう一度保存することは嫌いです。だから誰もオプションについて知っている、特定の日付以来、友人リストの変更を取得する方法?