Facebook API过滤用户活动,只显示指定的好友


Facebook API to filter user activity to show only specified friends

想象一下这种情况,我在facebook上有1000多个朋友,但我希望只阅读一小部分的更新,例如:10个亲密的朋友。我怎么能只收到这10个朋友的更新。我不知道我怎么能在脸书上做到这一点。我可以使用facebook API实现它吗?(Javascript、PHP、Java等。)非常感谢!

您已经标记了这个java、php和javascript,但假设您有php-sdk,则可以使用fql查询来检索您想要的信息

 //assuming $facebook is your php Facebook object
 $fql = url_encode('SELECT status_id, message,uid FROM status WHERE uid in(id1,id2,id3...)');
 $data = $facebook->api('/fql?q='. $fql);
 //data should now hold the response you want, though you will have to match up user names to the uid. I'm assuming you know who the top 10 friends are though and have their id

或者查看批处理请求https://developers.facebook.com/blog/post/2011/03/17/batch-requests-in-graph-api/或FQL多查询https://developers.facebook.com/docs/reference/fql/