You cannot get the key value online_presenceif you try to request Facebook without a Facebook access token. For instance:
SELECT uid, name, online_presence, status FROM user WHERE uid IN (4,5,6)
Without a set of access tokens, returns:
{
"data": [
{
"uid": 4,
"name": "Mark Zuckerberg",
"online_presence": "",
"status": null
},
{
"uid": 5,
"name": "Chris Hughes",
"online_presence": "",
"status": null
},
{
"uid": 6,
"name": "Dustin Moskovitz",
"online_presence": "",
"status": null
}
]
}
Whereas with a set of access tokens it returns:
{
"data": [
{
"uid": 4,
"name": "Mark Zuckerberg",
"online_presence": "offline",
"status": null
},
{
"uid": 5,
"name": "Chris Hughes",
"online_presence": "offline",
"status": null
},
{
"uid": 6,
"name": "Dustin Moskovitz",
"online_presence": "offline",
"status": null
}
]
}
Make sure that you install a valid Facebook access token (in PHP with the official Facebook SDK, it looks like this:) $facebook->setAccessToken($your_access_token);and have the appropriate permissions to access the data.
, , "", null . .