I'm developing an Android application and I encountered the following issue :
I'm querying Facebook for getting the list of my Facebook friends which are using the application. If we are not friends within the application, I can add them to my list of friends.
This is the request I make to Facebook in order to get the friends :
private Request createRequest(Session session) {
Request request = Request.newGraphPathRequest(session, "me/friends", null);
Set<String> fields = new HashSet<String>();
String[] requiredFields = new String[]{"id", "name", "picture", "installed", "first_name"};
fields.addAll(Arrays.asList(requiredFields));
Bundle parameters = request.getParameters();
parameters.putString("fields", TextUtils.join(",", fields));
request.setParameters(parameters);
return request;
}
If I install the app once, data will be stored on Facebook in the app section, I assume that's how the query works. Problem is if I uninstall the application from my phone, data will still be available on Facebook and I will still get that friend in the list of Facebook friends using my application, although he is not using it anymore.
I could do a check against my database with the response Facebook provides, but it's not really optimal: in case I have 20 Facebook friends and 10000 users in the application, I will have to check each entry.
Is there a way to handle this properly?
Aucun commentaire:
Enregistrer un commentaire