I want to Get list of users online without Facebook SDK.My fql Query is as below
$fql = "SELECT uid, name, pic_square, online_presence
FROM user
WHERE online_presence IN ('active', 'idle')
AND uid IN (
SELECT uid2 FROM friend WHERE uid1 = $user
)";
And my graph URl is
https://graph.facebook.com/fql?q=SELECT uid, name, pic_square, online_presence FROM user WHERE online_presence IN ('active', 'idle') AND uid IN (SELECT uid2 FROM friend WHERE uid1 = 1234)&access_token=xxxxxxtokenxxxxx&method=GET
But Above Url returning null data.
{
"data": [
]
}
Note: my token have friends_online_presence permission .I have 40 users online.
You need
user_online_presence
orfriends_online_presence
permissions to viewonline_presence
. (see http://developers.facebook.com/docs/reference/fql/user)Without these permissions you'll receive
online_presence
asnull
, and nothing will be filtered by this part ofWHERE
:online_presence IN ('active', 'idle')
If you'll remove this restriction from your query, you'll see the list of friends with their statuses (or nulls if you don't have this permission)