Facebook graph api user search by country - facebook-graph-api

Does anyone know a way to search users by country in facebook graph api?
Using following request:
search?q=jake&type=user&location=usa
But it just gives all the jakes available even if I change the location to any other country.
Is there a way to find all the users for a given country? Can I somehow use wildcards in q or All statement? Tried but no success I get data[]

Related

Facebook Graph API Search Posts for specific text in message field

Is there a way with graph facebook to search specific text content in the message of a user's posts? The assumption here is that the user id and access token is already available as well as all applicable permissions (ie. the user_posts permissions, etc..).
I read through the search feature on graph:
Facebook Graph Docs-Advanced
The following graph explorer example was provided:
GET graph.facebook.com/search?
q={your-query}&
type={object-type}
The table that lists the available types in the link provided is very limited (place, placetopic, ad_*). Is that the full list of possible types? Can we use POSTS or user posts as a type. I couldn't find the right syntax anywhere.
My goal is to retrieve a user's posts based on a specific message tag or text in their post message. Currently, the only way I know how to do this is highly inefficient. I would have to do the following:
Get user's full list of posts
https://graph/facebook/com/{version}/{userID}/?fields=posts&access_token={token}
Run a coded query to get the posts I need and discard the rest
Thanks in advance.

How to specify the country in facebook graph api search?

How to specify the country in facebook graph api search
im not very tech in this, need in simple form
https://graph.facebook.com/search?q=Sarkozy
Then, i want to have replies only in a certain country only.
https://graph.facebook.com/search?q=Sarkozy......?????
I have tried several methods, nothing worked out for being not knowledge in this
thanks in advance
Facebook uses geo ip to detect the country where the request came from, you should use a country proxy in order to "tell" facebook what kind of geo located results you want.

Facebook Graph API to search user statuses

I am trying to pull some of my facebook statuses that contain a particular keyword and show them on a web page, what is the url query string I should use?
The best I can came up with is graph.facebook.com/me/statuses
But it returns all the statuses, but i want statuses that contain a particular keyword, such in a search, how should I do it? Or is it even possible?
You'll have to manually go through the statuses returned from /me/statuses to find the ones that you care about. Facebook doesn't really let you use their computing power to search stuff like that.

How to get general data from facebook graph api

I'm looking into the facebook graph api. I understand that I can retrieve information about a facebook web page by making a get with the current id. It's also clear that after retrieving a access token I can post on the logged in users wall and do other operations.
But what if I want more general data? Can I, for example, get how many swedish user who have used the word "Obama" in their status update the last week?
I don't think that the current search API can be that specific. You can find everything about the search API in this document.

Is the list of cities that can be set for current city or hometown available?

It doesn't look like the input that FB uses for current city and hometown is available as a widget or dialog for developers to use. I'd like to create an autocomplete input field that uses the same names for cities and the corresponding ID's. There's the lists of the cities that FB publishes for post and ad targeting but that is incomplete and appears to be using a different ID space; I'd like the same cities and IDs that are available to users when they edit their current city on their profile. Using jquery to do the autocomplete part is doable but I just can't find an API or data source available to populate it.
Does anybody know how to access that data from the graph API, fql or any other Facebook sanctioned means?
I havn't seen a graph api or fql method for this. The best I have seen from Facebook is this list: https://www.facebook.com/ads/api/autocomplete_data.php which you would want to parse and cache the json since its a pretty big download. If you needed more details about the location, you could call the graph api by the id provided in that file.