Reputation: 117
How can i get list of 20 random ONLINE users on my friendlist @ Facebook, in their API?
Cannot find anything in the docs about select * from users where online = 1 'ish
FB.api('/me/friends', function(response) {
if(response.data) {
$.each(response.data,function(index,friend) {
//friend.id;
});
}
});
Upvotes: 1
Views: 1900
Reputation: 47976
Using FQL, you can easily get at this data -
SELECT uid,name,online_presence FROM user WHERE
online_presence = 'active'
AND uid IN (
SELECT uid2 FROM friend where uid1 = me()
) ORDER BY rand() LIMIT 20
Bare in mind that you'll need the friends_online_presence
permission to see the users friend's chat status.
Upvotes: 3