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請求,每次我想顯示用戶的所有好友。但是現在我想更新好友列表。我不願意刪除所有的朋友連接,並再次保存它們。那麼是否有人知道一個選項,如何從某個日期開始獲取好友列表的更改?