2012-04-01 44 views
2

任何人都可以告訴我狀態表和流表之間有什麼不同嗎?Facebook FQL:狀態表和流表之間的區別?

我使用圖形瀏覽器查詢我自己的帖子,我發現一些狀態更新只出現在狀態表中,其他狀態更新出現在流和狀態表中。當我去我自己的時間軸上時,我可以看到來自兩個表格的帖子。

這是怎麼回事?爲什麼只有一些在帖子表中,但出現在我的時間軸上?

我正在嘗試查找所有可公開顯示的帖子的列表,而且似乎要執行此操作,因此我需要查詢兩個表並最終生成一些重複項。有沒有更好的辦法?

下面是一個例子:

graph.facebook.com/10150680671412355 

{ 
    "id": "10150680671412355", 
    "from": { 
    "name": "Alan Byrne", 
    "id": "509517354" 
    }, 
    "message": "Beans on toast.", 
    "updated_time": "2012-03-14T10:53:01+0000", 
    "likes": { 
    "data": [ 
     { 
     "id": "xxxxx", 
     "name": "xxxx" 
     } 
    ], 
    "paging": { 
     "next": "https://graph.facebook.com/10150680671412355/likes?method=GET&metadata=true&format=json&callback=___GraphExplorerAsyncCallback___&access_token=AAACEdEose0cBAPjaO9gCyMZA2TT5hRE7iEkgmksfpNneFdtshFDfp0oM3hiX6I57vUkzGZAyXW5c9YaM1WQFUxt2zTZCden7zTAlbMSDAZDZD&limit=25&offset=25&__after_id=100001368900242" 
    } 
    }, 
    "comments": { 
    "data": [ 
     { 
     "id": "10150680671412355_31516486", 
     "from": { 
      "name": "xxxxx", 
      "id": "xxxxx" 
     }, 
     "message": "Peasant. Baked beans on the other hand...", 
     "can_remove": true, 
     "created_time": "2012-03-14T11:20:35+0000" 
     } 
    ], 
    "paging": { 
     "next": "https://graph.facebook.com/10150680671412355/comments?method=GET&metadata=true&format=json&callback=___GraphExplorerAsyncCallback___&access_token=AAACEdEose0cBAPjaO9gCyMZA2TT5hRE7iEkgmksfpNneFdtshFDfp0oM3hiX6I57vUkzGZAyXW5c9YaM1WQFUxt2zTZCden7zTAlbMSDAZDZD&limit=25&offset=25&__after_id=10150680671412355_31516486" 
    } 
    }, 
    "type": "status" 
} 

然而,當我掃描上在同一天流的帖子,這其中不回來

fql?q=select message,post_id,created_time from stream where source_id=509517354 and created_time > 1331596800 and created_time < 1331856000 

{ 
    "data": [ 
    { 
     "message": "", 
     "post_id": "509517354_10150680640782355", 
     "created_time": 1331720877 
    }, 
    { 
     "message": "", 
     "post_id": "509517354_10150680632467355", 
     "created_time": 1331720499 
    }, 
    { 
     "message": "MY COMPUTER DOES NOT HAVE FUCKING VIRUSES! STOP CALLING ME! ARGH!", 
     "post_id": "509517354_10150680618357355", 
     "created_time": 1331719866 
    }, 
    { 
     "message": "", 
     "post_id": "509517354_10150680602327355", 
     "created_time": 1331719906 
    }, 
    { 
     "message": "I did it!", 
     "post_id": "509517354_10150680491832355", 
     "created_time": 1331716355 
    }, 
    { 
     "message": "", 
     "post_id": "509517354_10150680446052355", 
     "created_time": 1331714440 
    }, 
    { 
     "message": "It got to Australia.\n", 
     "post_id": "509517354_365689393454249", 
     "created_time": 1331679835 
    }, 
    { 
     "message": "", 
     "post_id": "509517354_107999992664739", 
     "created_time": 1331677643 
    }, 
    { 
     "message": "", 
     "post_id": "509517354_10150678888762355", 
     "created_time": 1331671872 
    }, 
    { 
     "message": "Booooo", 
     "post_id": "509517354_268316116580687", 
     "created_time": 1331632096 
    }, 
    { 
     "message": "'spose I should wander into the office...", 
     "post_id": "509517354_10150678259167355", 
     "created_time": 1331625013 
    }, 
    { 
     "message": "", 
     "post_id": "509517354_10150678258862355", 
     "created_time": 1331624991 
    }, 
    { 
     "message": "", 
     "post_id": "509517354_10150678257547355", 
     "created_time": 1331624907 
    }, 
    { 
     "message": "", 
     "post_id": "509517354_10150678250602355", 
     "created_time": 1331631742 
    } 
    ] 
} 

回答

2

流包含的帖子各種類型 - 鏈接,簽到,照片狀態更新。

狀態表只包含狀態更新 - 沒有其他鏈接的文字,照片等

如果你希望找到類似時間表的內容,你將要使用的流表。

+0

嗨湯姆。問題是,如果我查詢流表,我沒有得到時間軸上的所有結果。帖子表中有項目沒有出現在流表中,但在我的時間軸上。這是正常的嗎? – Burnsie 2012-04-02 15:10:12

+0

嗯。你錯過了什麼樣的故事?定期,簡單,共享的帖子?還是更復雜的故事? [此遷移](https://developers.facebook.com/blog/post/592/)可能是相關的。 – 2012-04-03 02:50:24

+0

這只是一個普通的職位。請參閱上面的編輯瞭解更多信息 – Burnsie 2012-04-11 20:19:57

相關問題