Reputation: 705
As you know, with Facebook Graph API v2.0 upgrade you no longer can retrieve all the friends using the "me/friends" endpoint. That endpoint will now return only those friends who are also registered for the same app (app-scoped users). To retrieve all the friends, Facebook provided a new API (taggable friends) at endpoint "me/taggable_friends".
The problem I am having is that taggable friends list is a super set of the friends list and there is no reliable way to exclude the latter from the former. Thus the users from the "me/friends" list will also appear under the users from "me/taggable_friends" list.
For example, let's say I have total of 2 different friends on Facebook and both of them are called "Joe Hammer". Let's further imagine that only one of them is also using the app that I am using. The app allows users to tag friends on Facebook. For this there is a drop-down that shows all the friends that a user can tag. Previously it would show both "Joe Hammers" in the list as "me/friends" API would return all the friends. Now there has to be two separate lists, one to show the friends that are already using the app ("me/friends" result, or app-scoped users), and a second list, to invite the ones who are not using the app yet ("me/taggable_friends" result). However, on the page the first list will correctly show only one user "Joe Hammer" that is registered with the app. But the second list will show both Joe Hammers, as technically they are both taggable. Since the result set returned from "me/taggable_friends" is using encrypted temporary user IDs there is no way for me to filter out the users from the taggable friends list who are already on the "registered" friends list. As you can imagine this makes the UI look a bit ugly with duplicate users showing up on both lists.
One may argue that this is not a common case and you can filter by a user name, as so far that is the only field that is common between the nodes of both lists. However, this scenario is not uncommon. I would say at least 5% of users would have two or more friends with the same name.
Upvotes: 0
Views: 358
Reputation: 74004
The only way i can think of (and i assume that was your intention too) is to read friends with /me/taggable_friends
and /me/friends
and compare them by name. Those who are not in the result of /me/friends
don´t use the App, obviously.
But keep in mind that you are only supposed to use taggable_friends
for tagging friends and nothing else. So it would actually not make much sense to filter them, the user should decide which friends he would like to tag, no matter if they are already using the App or not.
Upvotes: 1