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}.
Related
Is there still a way to get Facebook comments from a site URL using Graph API?
I tried converting a site URL to an object-id, but it failed using Graph API Explorer.
Some older posts mention using /{object-id}/comments, some mention ?id=https://she.hr/nevjerojatni-spoj-dragocjenih-bisera-i-pouzdane-njege-uz-nivea-pearlbeauty-black-antiperspiranate/&fields=og_object{comments{message,from{name,%20picture}}}
But I couldn't get a single comment.
I also found fb_comment_id in comments' IFRAME, but couldn't get data on that one either on Graph API explorer (using /{comment_id}).
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
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
I was successfully able to get the RSS feed of a page in FB using this URL.
https://facebook.com/feeds/page.php?id=PAGE_ID_HERE&format=rss20
It returns values in RSS format. Then using regular NSXMLParser methods or some so parsing protocols, I was able to parse them.But unfortunately it returns all the details of the page, such as Events, notes and etc.
I would like to get the events only. It is stated here, we can achieve it using Graph API once we obtain the general access token. My question is, can't we simply get the RSS feed for events in facebook page like the URL above? Please advise. Thank you.
It looks like the FB API and all RESTful methods of accessing data from Facebook are being retired in favour of the Graph API and FQL, whichever you prefer.
The Graph API way is to parse the JSON returned by:
https://graph.facebook.com/PAGE_ID/events?access_token=TOKEN_HERE
After skim-reading the FQL docs, I can't find a way to do it using that. So, it looks like your best hope lies with the Graph API.
I would really like to know how to do this. We have a facebook page and have a livestream from this page on our website. Now we would like to have a list of events from the facebook page in the website as well. Is it posible at all?
What is the proper way to query Facebook by Facebook Query Language (FQL)?
The documentation for 'Stream':
https://developers.facebook.com/docs/reference/fql/stream/
says query "https://api.facebook.com/method/fql.query?query=SELECT" in the example ("Try this query")
Note: To query the stream, it is perfectly possible to use the "graph.facebook.com".
However, the others, for example, the 'Comment':
https://developers.facebook.com/docs/reference/fql/comment/
says query "https://graph.facebook.com/fql?q=select" in the example ("Try this query")
So, which is which? Which is better for performance? Because both works, will Facebook obsolete one of them?
Your second URL is the Graph API url, which is the current preferred method: https://graph.facebook.com/fql?q=QUERY.
The other url api.facebook.com is the REST API url. According to the REST API page:
We are in the process of deprecating the REST API. If you are building a new Facebook app, please use the Graph API. While there is still functionality that we have not ported over yet, the Graph API is the center of Facebook Platform moving forward and where all new features will be found.
So in this case, performance isn't the issue. Use the graph url.