0

我从我的 facebook 页面获得了这个 JSON 数据:

{
  "data": [
    {
      "id": "1234567890_0987654321", 
      "from": {
        "name": "My Facebook Page", 
        "category": "Personal blog", 
        "id": "1234567890"
      }, 
      "actions": [
        {
          "name": "Comment", 
          "link": "http://www.facebook.com/1234567890/posts/0987654321"
        }, 
        {
          "name": "Like", 
          "link": "http://www.facebook.com/1234567890/posts/0987654321"
        }, 
        {
          "name": "Action Name", 
          "link": "http://example.com/"
        }
      ], 
      "message": "This post discusses something about Javascript.", 
      "name": "A post about javascript.", 
      "link": "http://example.com/", 
      "caption": "JavaScript", 
      "description": "Something telling about the post.", 
      "created_time": "2012-10-09T03:35:22+0000"
    },
    {
      "id": "1234567890_0987654321", 
      "from": {
        "name": "My Facebook Page", 
        "category": "Personal blog", 
        "id": "1234567890"
      }, 
      "actions": [
        {
          "name": "Comment", 
          "link": "http://www.facebook.com/1234567890/posts/0987654321"
        }, 
        {
          "name": "Like", 
          "link": "http://www.facebook.com/1234567890/posts/0987654321"
        }, 
        {
          "name": "Action Name", 
          "link": "http://example.com/"
        }
      ], 
      "message": "This post discusses something about CSS.", 
      "name": "A post about CSS.", 
      "link": "http://example.com/", 
      "caption": "CSS", 
      "description": "Something telling about the post.", 
      "created_time": "2012-10-09T03:35:22+0000"
    }
  ]
}

无论如何我可以用 FQL 来做到这一点,我只会有所有的帖子"caption": "JavaScript"吗?我想按类别对我的帖子进行排序,我的关键字在"caption"属性内。

4

2 回答 2

0

如果您想按订单缩短提要,FQL 则需要在此处使用其中一个示例

SELECT post_id, actor_id, target_id,description, message FROM stream WHERE source_id = me()  order by description
于 2012-10-09T06:37:44.450 回答
0

感谢所有回答我问题的人。我想我已经得到了我的问题的答案。

我将在 FQL 上执行此查询以获取所有帖子"caption": "Javascript"

SELECT actor_id,message,attachment FROM stream WHERE source_id=1234567890 AND attachment.caption="Javascript"
于 2012-10-09T06:48:12.637 回答