I am trying to 开发者_JAVA技巧fetch the profile feed from a user's facebook. For this I am using the graph api and calling the feed api to fetch the data. But I want only those things posted by his friends. However, I am getting also the posts of his pictures(like the 5 pictures in a row at the top of the profile page) which we can see in the new facebook layout. How can I filter this while calling the feed api so that only the posts by others can be fetched?
This is a sample of what facebook returns:
{
"data": [
{
"id": "1000011715XXXXX_5006082821985",
"from": {
"name": "test",
"id": "10000117XXXXXX"
},...
You need the from attribute. That id is the id of the person who posted on the wall. If it's the same with the user id you are querying you can filter it. Hope this helps.
精彩评论