无法使用正确的权限集和用户在线状态从 Facebook 检索有效的在线状态数据
我遇到了一些以前可以工作的代码的问题。我想检索用户当前是否在 Facebook 网站聊天中在线的信息。因此,我请求具有“user_online_presence”权限的访问令牌,并且在运行 fql 查询时:(
"SELECT uid, name, pic_big, online_presence, status, current_location
FROM user
WHERE uid="+userId
其中 userId 被用户的真实 ID 替换)
“online_presence”字段始终为“离线”,尽管我在浏览器和测试用户在线聊天。所有其他信息均正确呈现。我知道这段代码在几个月前曾经有效。我尝试使用多个用户帐户,但结果始终相同。
有人面临类似的问题吗?是否有任何我不知道的 API 更改(我确实搜索了与“user”表中 online_presence 字段相关的 API,但没有成功)?
多谢!
I'm facing a trouble with some code that used to work before. I want to retrieve information whether user is currently online on Facebook's website chat. Thus, I'm requesting access token with 'user_online_presence' privilege and when running fql query:
"SELECT uid, name, pic_big, online_presence, status, current_location
FROM user
WHERE uid="+userId
(where userId is replaced by the real id of the user)
'online_presence' field is always 'offline' although I have my test account opened in the browser and test user is online for chat. All other information is presented correctly. And I know that this code used to work couple of months ago. I tried with several user account, but the same result always.
Is anyone facing similar issues? Has there been any API change I'm not aware of (I did search for the ones related to the online_presence field in 'user' table but without any success)?
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然可能性不大,但您是否尝试过使用
WHERE id = me()
而不是输入用户 ID?It's a long shot, but have you tried using
WHERE id = me()
rather than feeding in the user id?