https://graph.facebook.com/search?access_token=xxxxxx&q=hello&type=post&fields=from,message,picture,link,name,caption,description,created_time&limit=1&locale=en_US&scope=publish_stream,offline_access,user_status,read_stream
這樣的圖搜索後,我得到這樣一些數據:如何在圖形搜索後獲取Facebook信息?
{
"data": [
{
"from": {
"name": "Eric Fluegge",
"id": "100000626293694"
},
"message": "Well, here's go nothing. Hello Tennessee.",
"created_time": "2013-03-30T19:23:44+0000",
"id": "100000626293694_567340783296793"
}
],
"paging": {
"previous": "https://graph.facebook.com/search?fields=from,message,picture,link,name,caption,description,created_time&q=hello&limit=1&type=post&locale=en_US&access_token=XXXXXXXXXXXXX&since=1364671424&__previous=1",
"next": "https://graph.facebook.com/search?fields=from,message,picture,link,name,caption,description,created_time&q=hello&limit=1&type=post&locale=en_US&access_token=XXXXXXXXXXXXX&until=1364671423"
}
}
如此,是"id": "100000626293694_567340783296793"
後ID?如果是這樣,如何使用這個帖子ID,再次查詢,只有這個特定的帖子信息?我想將post id
存儲到mysql表中,那麼我想在將來隨時查詢這篇文章,謝謝。
EIDT:在應用程序的設置,我已經設置了publish_stream,offline_access,user_status,read_stream
EIDT2: 我曾嘗試到Graph API Explorer
,選擇read_stream
並生成萬歲令牌。
SELECT post_id, actor_id, message, type, attachment FROM stream WHERE post_id = "100000626293694_567340783296793"
結果仍爲空。所以我找不到帖子,因爲我不是帖子作者的朋友?或者100000626293694_567340783296793
不是帖子ID?或其他原因?
** ** offline_access現在已經貶值。 –
事實上,它已被長期生存的access_tokens取代。 –