Facebook Graph API - Retrieving friends belonging to specific list - facebook-graph-api

I am quite sure it is supposed to work but can't get it right.
I am trying to retrieve my friends belonging to specific list (type=close_friends).
I am able to retrieve my lists via
https://graph.facebook.com/me/friendlists
But i need the actual friends associated with each list.
I would expect it to be something like:
https://graph.facebook.com/me/friends?fields=????

FriendList is a Graph API object supporting a members connection.

Related

How can I filter taggable friends list and only retrieve the ones that are not already part of friends list using Facebook graph API

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

Some relationship-status not getting returned when clearly visible on profile

When using the open graph api to list - all friends by relationship_status some friends are getting returned empty for relationship_status. I have the right permissions set as most friends relationship_status are returned if not set to private.
question of the friends in question that are getting returned empty, I can clearly go onto the profile and view their relationship_status. My only guess as I have searched around would be that they have it set so I personally can see it but others it is private??
requested information:
It's not just doing it in my code but also in the Graph API Explorer.
Example:
->/me?mfields=id,name,friends.uid( person querying ).fields(relationship_status)
returns the relationship for people that have it set viewable to me but for some reason certain people that I can go on their profile and look right at their relationship_status when queried returns nothing???

What fields/properties can be queried from Facebook Graph API on a Place object?

I'm doing a query of this form:
https://graph.facebook.com/search?q=Beshoff&fields=likes,checkins,products,name,talking_about_count,description,category&type=place&center=37.327453,-121.813102&distance=400
I am interested in finding out the exhaustive list of fields that can be selected for a Place object.
In particular, on the facebook page for a specific place, there are often multiple categories listed which I have been unable to figure out if it's possible to retrieve using the Graph API.
e.g. On https://www.facebook.com/BeshoffInfiniti, there is an entry "Car Dealership" but the graph api call above returns "Local business".
If you leave out the "fields" attribute in your query you will get all the fields. The number of fields depends on the object type (for example owned pages vs. wiki pages)
Don't just look at the Graph API. Take a look at FQL. There are different fields available in FQL vs. the API. And yes, using the distance function you can look for places in an area.
Graph API != FQL
One thing to try is the Facebook Open Graph schema entry for Page and Place.
You'll find all the additional fields for Pages. You can think of places as a subclass of pages.
If you're curious about the types of page that might be returned, try having a look through the create a page flow.

How can I get "close friends" list of a Facebook user, using the Graph API?

The graph Api gives me the user's friends.
But I want to know who its close friends are (SmartLists).
How can I do that using the Graph API?
You can call /me/friendlists to get the friends list. One of them should be close friends. Then go to /closeFriendsListId/members to see who is on that list. You will need read_friendlists extended permissions.
I recently saw a simpler way. /me/friendlists/close_friends?fields=members will give you the list of all members at one shot. Just wanted to put it out here in case if somebody needs help.
Similarly, call to /me/friendlists/family?fields=members will give family members.
P.S: "close_friends" and "family" are keywords and no need for a ID.
This is no longer possible. Facebook removed the ability to see the members of a friend list somewhere before version 2.5 of their API.

how to the get the friend count of each one of a user's friend?

is there a way with the Graph API or even the old API to get the number of friends (not the list of names, just the count) of each friend of my user?
so if John is using my app and John has 3 friends, Stacy , Amy and Bill, I would like to know how many friends Stacy, Amy and Bill have..
I know you can't get the list of friends (only the ones in common), I just want the count.
I don't think the count is private. In fact, even for people who block their friend list, I get a count of how many friends they have on the original email I get when they friend me., right under their name.
Graph API and FQL don't provide this information. It is publicly available without being logged in on alot of users pages by going to https://www.facebook.com/profile.php?id=5 and then scraping it. Although its against the terms of service and isn't available for every user.
You can get this information from the Graph API by issuing a request to the /PROFILE_ID/friends endpoint. This will return a list of the user's friends as an array-- which you can count.