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
}
}
}