View Full Version : API for facebook friends.getAppUsers
Oct 4th, 2011, 04:42 AM
Currently we are using https://api.facebook.com/method/friends.getAppUsers to get all the user friends that authorize our app. I could not find any API for that in the facebook template in spring social. Am I missing it?
Oct 4th, 2011, 08:51 AM
No, you didn't miss anything. the friends.getAppUsers endpoint is from Facebook's legacy REST API, which they are gradually deprecating. Spring Social Facebook doesn't bind to any of the legacy operations and focuses on the Graph API.
I looked at the Graph API docs and didn't find any equivalent endpoint (I'd expect it to be a connection on the Application object or the User object). If you know of an equivalent endpoint in the Graph API that I'm overlooking, let me know and we can look into adding it.
Oct 5th, 2011, 03:14 AM
I could not find equivalent Graph API call for friends.getAppUsers, however i can get this data bu running a query using Facebook FQL: SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = XXX) AND is_app_user = 1
Looks like I will need to extends FacebookTemplate to include this API by using the above FQL
Oct 5th, 2011, 08:50 AM
Yes, I came up with the same FQL query yesterday and was planning to tell you about it here...seems you beat me to it!
FacebookTemplate doesn't currently support FQL, but it is something I'd like to see added (see https://jira.springsource.org/browse/SOCIALFB-8). But I'd like to make sure that it's implemented well and is flexible enough to support all kinds of queries and return values (I picture it similar to how JdbcTemplate works). When that's in place, Facebook's bindings can use that to offer operations that can't be had with just the Graph API.
In the meantime, you can extend FacebookTemplate, call getRestTemplate() and then do the FQL you need.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.