I'm trying to use the Facebook graph api to get a list of friends who have visited a certain country, like the result from the facebook graph search friends that have been to ...
The solution I have found is to get all of their locations using me/friends?fields=locations.fields(place),picture&limit=5, and then filter out those who have been to a certain country. The problem with this is that the response time is very long (2s for 5 friends!).
How can I get a list of friends who have been to a certain country, without having to request all of their locations?
Related
How can I use the Facebook Ads API to find a comprehensive list of all the cities that can be targeted for ads, and what parameters should I use in my request to ensure that I receive accurate and up-to-date information?
I tested the following parameter in Facebook Graph API Explorer, and its returned an empty Result, but it displays a complete list of countries when I change location_types=['country']
search?location_types=["city"]&transport=cors&type=adgeolocation
Is there a CSV for all the geolocation details for Facebook? How can I get a List of all cities Facebook Ads GeoLocation has?
Is it possible with the new Facebook Graphi API 2.5 to check how many friends (just a number, no names etc.) of a user liked a certain venue (restaurant, museum, etc.)?
I checked the Graph API explorer and there is the following debug message:
Only friends who installed this app are returned in API v2.0 and higher.
total_count in summary represents the total number of friends,
including those who haven't installed the app.
Is it possible?
Is there a way to get a list of the sums of likes/shares the calling user has made on his/her friends' objects over a specified time frame broken out by friend, without having to iterate over all objects that a user's friends have posted, tallying their likes from that user, and then re-doing that for all of the user's friends?
No, this is not possible with the current Graph API.
I know how to get friends using my app using Graph API:
me/friends returns the list of friends using my app.
I also know how to check if two friends have any mutual friends, too (I've asked this question before: Determining if two app using users have any mutual friends in Graph API 2.0/2.1?):
{user_id}?fields=context.fields(mutual_friends) returns my mutual friend count and list of mutual friends using the app.
However, I need a list of friends of friends who use the app. I can first get all my friends (the first query above) and check if I have mutual friends with them by querying the second endpoint that I've provided above for each user. But for example, if I have 50 friends on my app, it means querying Facebook 50 times, which is definitely not an acceptable behavior. I have privacy settings in my app which contains "friends of friends" option. How can I get all friends of friends using my app in a single query (or at least, not an O(n) query).
Does anyone know how to build a graph api query string that is able to fetch the following things:
rating information of nearby restaurants that shows in the "Nearby Places" function of iOS App
friends that also had checked in at a specific restaurant