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
经过这样的图形搜索后,我得到了一些数据,例如:
{
"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吗?如果是这样,如何使用这个post id,再次查询,只得到这个特定的post信息?我想存储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?还是其他原因?