如何确定用户喜欢的对象?

时间:2013-05-27 18:22:37

标签: facebook facebook-like facebook-fql facebook-stream-story

我正在进行FQL查询以获取用户的帖子:

{
  "feeds": "SELECT type, actor_id, target_id, app_data, action_links, permalink, post_id, viewer_id, created_time, updated_time, source_id, message, description, attachment FROM stream WHERE filter_key = 'owner' AND source_id = <userId> AND is_hidden = 0 LIMIT 50"
}

在大多数情况下,结果都很棒。但是,如果结果中包含有关用户“喜欢”某事的帖子,我该如何确定“喜欢”的内容?

例如:

{
      "type": null, 
      "actor_id": <userId>, 
      "target_id": null, 
      "app_data": [
      ], 
      "action_links": null, 
      "permalink": "", 
      "post_id": "<postId>", 
      "viewer_id": <userId>, 
      "created_time": 1369109320, 
      "updated_time": 1369109320, 
      "source_id": <userId>, 
      "message": "", 
      "description": "<user name> likes a status.", 
      "attachment": {
        "description": ""
      }
    }

哪种状态?

或者:

{
      "type": null, 
      "actor_id": <userId>, 
      "target_id": null, 
      "app_data": [
      ], 
      "action_links": null, 
      "permalink": "", 
      "post_id": "<postId>", 
      "viewer_id": <userId>, 
      "created_time": 1367029922, 
      "updated_time": 1367029922, 
      "source_id": <userId>, 
      "message": "", 
      "description": "<user name> likes a link.", 
      "attachment": {
        "description": ""
      }
    }

哪个链接?

我是否需要执行多部分查询才能从其他表中获取额外数据? 为什么target_id总是为空?

1 个答案:

答案 0 :(得分:1)

这是一个长期存在的错误,由于未知原因尚未修复 https://developers.facebook.com/bugs/522743067756848

在API中实际上没有有效的方法。

<postId> = <userid_pId>

通过Facebook UI的方式是https://www.facebook.com/userid/posts/pId

我已经开通了一个新的错误报告,但我非常怀疑它是否会被修复。

https://developers.facebook.com/bugs/648986871793611

相关问题