How to retrieve a list of facebook pages with a given keyword using facebook graph apis? - facebook

I want to get a list of facebook pages which has a given word in it's description or name. Is it possible to get it from existing facebook graph apis.

yes it is available
use this:
search?q=Your_keyword&type=page
https://developers.facebook.com/tools/explorer/?method=GET&path=search%3Fq%3DYour_keyword%26type%3Dpage&version=v2.10#
for more options go here:
https://developers.facebook.com/docs/graph-api/using-graph-api/#search
you can also extend as many options you need like this:
search?q=Your_keyword&type=page&fields=id,name,location

Related

Facebook Graph API: search people by city

I'm trying to find people either from particular city or who live in that city. Is there an API for this purpose?
When I use Facebook page, I can type in "People who live in Rome, Italy" (which is translated to URL https://www.facebook.com/search/115353315143936/residents/present) and it shows me all people who currently live in Rome. Using web page I can also search people by name and then add additional filter by city.
Can I do something similar with Graph API?
You can only search by name with the API: https://developers.facebook.com/docs/graph-api/using-graph-api#search - there is no way to get the same kind of search than on facebook.com.
you can add center and distance in the query
this comes from the documentation, you can change the type to type=user
GET graph.facebook.com
/search?
q=coffee&
type=place&
center=37.76,-122.427&
distance=1000

Query for pages of a specific type on Facebook

I need to have something like http://fanpagelist.com/category/musicians/ in my web app.
Basically I need to allow users to search through Facebook pages of musician/band category and sort by number of fans.
The closest I got was with this FB Graph API call:
search?q=musician&type=page&limit=25&after=MjQZD&fields=name,fan_count,category
But that is searching for pages that have 'musician' in the name, not in the category field.
Any idea? It must be possible since fanpagelist can do it...
There is no way to filter the results from that search endpoint directly.
You are limited to the options described under https://developers.facebook.com/docs/graph-api/using-graph-api/#search, and that basically means you can search by name, but nothing else.
So you will need to filter the results on your end.

List of Facebook Users Containing a Particular Name

I wish to use the Facebook api to return a list of users contain a particular name:
For example, the following http search for the name Macallum:
https://www.facebook.com/search/results/?q=Macallum&type=users
gives the desired result. However I wish to do this using the api. Is this possible?
Have a look at the answer I gave here: Is it possible to retrieve list of public facebook profiles through the Graph API?
You can use the /search endpoint to search for names.

tagging system using facebook friend list

My friend and I are working on an app that will use Facebook's friendlist. We're trying to create a tagging system in which people can tag each other...similar to example in screenshot.
Does facebook provide this functionality out-of-box or do I have to create this sort of search/input field? I wasn't sure if I simply have to style something they provide or if I have to make it.
You can't tag people on a just like that.
You have to use Open Graph concepts- Mention Tagging
But if you want to post a photo, then you can tag the people using tag parameter.
Good luck!

Find related facebook interests using graph API

I'm trying to figure out a way find related interests on Facebook. E.g. I want to search for Cityville and result should be Farmville, Castleville etc.
Is there an API to support this, what are the alternatives?
You can search the JSON result by the Graph API with the url https://graph.facebook.com/me/likes?access_token={your_token_here}, replacing the "me" with the Facebook User ID/Name.
If you are looking for pages search, you can use the same API, with the url https://graph.facebook.com/search?q={keyword}&type=page&access_token={your_token_here}.