Yes, the Graph API is horribly documented. I don't see any documentation for an "application" type, but they do reference an application's info in the docs:
I've done a lot of investigations on this issue. From what I can tell, there is no way to do Friends.getAppUsers using Graph API. The latest SDKs provided by Facebook all use the old REST API to get friends using the application.
The workaround is to do the filtering yourself. Presumably, you have all the uid's of the users who have signed up for your application sitting in your own database. So first get all the users' friends' uids, and select the users from your database who have matching uids.
The new Facebook Graph API program seems very poorly executed and not quite thought through. It seems they rushed to publish it for Facebook f8 before it was mature, and lots of functionality is missing that was available before.
Using restFB, I did the following (thanks Igy / Alex for the guidance). Note that Facebook returns an array of friend IDs with "installed"=true if the user is installed (as can be seen here).
First extend the User class, adding an installed field:
import com.restfb.Facebook;
import com.restfb.types.User;
public class InstalledUser extends User {
@Facebook
private boolean installed;
public InstalledUser() {
}
public boolean getInsatlled() {
return installed;
}
}
Next, using the DefaultFacebookClient:
FacebookClient facebook = new DefaultFacebookClient(pFacebookAccessToken);
Connection<InstalledUser> installedFacebookUsers = facebook.fetchConnection("/" + pFacebookId + "/friends", InstalledUser.class, Parameter.with("fields", "installed"));
for (List<InstalledUser> friends : installedFacebookUsers) {
for (InstalledUser friend : friends) {
if (friend.getInsatlled()) {
// Add friend.getId() to a list of ID, or whatever
}
}
}