androidfacebookfacebook-graph-apiandroid-facebookfacebook-app-requests

Facebook "apprequests" filters not working on android


I am trying to show an App request dialog that shows a list of friends that are not users of my app to send invites. This is how i am going about it.

 Bundle parameters = new Bundle();          
 parameters.putString("message", "Send Request");
 String filters = "app_non_users";
 parameters.putString("filters", filters); 
 WebDialog.Builder builder = new Builder(context,Session.getActiveSession(), "apprequests", parameters);
 // add listener
 WebDialog webDialog = builder.build();
  webDialog.show();

It shows a dialog like this with "Suggested Friends". enter image description here

These are not the friends i want. i want only the non app users and these are all my friends under the suggested friends heading. If i supply facebook ids in a parameter of "suggestions", it rightly shows those facebook ids under the suggestions but this "filters" parameter is not working. I have also tried adding it as a string array. Am i doing something wrong?

Thanks


Solution

  • Let me answer it just in case someone else comes across this too. This code will work if you are using v2 of the API. i had not completely moved to v2, i was running in the compatibility mode (Settings.setPlatformCompatibilityEnabled(true);) and because of that the call was being made to the v1 API by default. Changed this and its working like a charm.