Reputation: 1148
How do I find friends activity within app?
I'd like to do something like this: https://graph.facebook.com/me/friends/news.reads
I can find my friends in the app with this: me/friends?fields=installed,name?limit=5000 then pull out the friends with the 'installed' field.
Then I can query each friend by id to get their activity: /news.reads
But is there some way to combine this query? It seems like I'm jumping through hoops to get the info I want.
Basically what I'm looking to do, is if I have a URL, find my friends who've read it, and display the last friend.
The 'fb-activity' widget does something similar, but I need more granular control, and I want to do it for a list of URLs, not just the current page.
Any suggestions?
Upvotes: 1
Views: 1742
Reputation: 34337
You are probably better off getting the friends list with FQL instead of filtering:
SELECT uid FROM user
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
AND is_app_user = 1
See: http://facebook.stackoverflow.com/questions/2785093/facebook-friends-getappusers-using-graph-api
Upvotes: 1