我如何获得用户的最近100个状态

问题描述:

我似乎无法找到允许我获得用户的最近X状态的参数。我如何获得用户的最近100个状态

现在我的图形API路径是这样的:

/12345/status 

,我看不到任何参数,能够通过最新的过滤和计算。有任何想法吗?

像这样的做,但首先你需要user_status的权限。读这http://developers.facebook.com/docs/reference/login/extended-profile-properties/

your_fb_id?fields=id,name,posts.limit(100) 

你可以尝试在FB图形API Explorer工具http://developers.facebook.com/tools/explorer

FQL可用于从用户的墙上获取最新状态。

以下查询将返回用户自身排除状态的最近100状态。

SELECT post_id, actor_id, target_id, message 
FROM stream WHERE filter_key = 'nf' AND is_hidden = 0 AND actor_id != me() 
ORDER BY created_time DESC LIMIT 100 

这里filter_key 'nf'是指新闻提要。您可以找到有关FQL流表的字段的更多细节here

更新:

您可以调用使用图形API的任何FQL查询,看到this blog post从FB

+0

我不想FQL我想用图形API – adit 2013-03-13 07:30:44

+0

@adit查看答案我更新的代码。您可以使用图形API本身查询FQL。 – Vijay 2013-03-13 10:06:48