How can I do a FQL query like the following by using the Open Graph API?
“SELECT name FROM page WHERE CONTAINS(“music/band”)”
More specifically, I seek a way to get all the facebook pages of a specific category.
It is not possible to get Pages by category, you can only use the Search API to search Pages by name: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.1#search
Related
I'm trying to fetch some data from page posts on Facebook with the Graph API. I'm using Python normally but I try the queries first with the Exploration tool offered by Facebook.
I used the page_id + post_id to get the number of reactions (I would also like to get the count for each different reaction) and likes. But it just returns nothing. I get the data for the shares though. I have the post open on another tab and it has likes and reactions.
Don't know what I'm doing wrong.
Since FQL is deprecated from 2.1 onwards.Is there any way to get all the posts that a page is tagged in using Graph API.
tried {page_id}/tagged but it shows only the page's posts not the posts that a page was tagged.
I want to query the posts using graph API by a user on their own wall that tags the page.is there any way to do that?
isn't this a functionality of the Public Feed API which Accessing it is restricted to a limited set of media publishers and usage requires prior approval by Facebook. Applications to the API are not open at this time.
Say my app needs to offer a full text search service against all status messages a user posted on Facebook.
So my app will connect to Facebook on the behalf of the user (using OAuth) and use the Graph API to query the statuses.
What I have managed to do so far is:
using plain Graph API: /me/statuses
List statuses, but there is no way to search against the message (the text inside the status)
using FQL: select message from status where uid = me() and strpos(lower(message), 'prague') >=0
Search against status messages for a specific keyword ('prague')
The fact that it is not possible to perform an advanced textual search against the status messages has already been discussed in some questions, e.g.: Facebook Graph API to search user statuses
So, in order to provide such a service my app should:
read all the statuses in: /me/statuses
extract the messages and send them to a full text search engine (like Solr)
Is this the only solution? Do you see a better solution?
I login in facebook with my user and I get an access token from api explorer.
If i search coca-cola in the facebook search box on the normal wall page i get the (official) coca cola page as first result, which has 40 million fans.
If i search with restfb with the graph api, using my access token , that page isn't found in the first 550+ results : Fb explorer query
(I noticed it's the same in fb: if you search in the search bar without pressing enter, that page is the first, if you then click on get all results, that page isn't in the results.)
Why?
Is there a way to get ALL the results like in the search box?
Or at least to get the most "liked" first?
Thank you.
No, unfortunately the Graph API is kinda a "stripped down version" of Facebook's data and functionality. The best you can do is to paginate where you can, and also explore both FQL as well as the newer Graph API objects to pull data from.
Is there a way to search specific type of feed of the user by using the Graph API with
https://graph.facebook.com/me/feed
The URL normally returns most recent feeds but it is too much data, I just want to search for a specific feed based on some keywords. I have tried
https://graph.facebook.com/me/feed?q=SEARCH_KEYWORD
but it does not work (returns empty)
You might want to have a look at https://developers.facebook.com/docs/reference/fql/
With FQL you can pass SQL-Like queries to the Facebook API.