search specific post in facebook using gaph api - facebook-graph-api

I am trying to search for a specific post on my page which starts with specified text. I am able to search all public post by using
https://grpah.facebook.com/search?q=specified text&type=post
or
getting all feeds of my page
https://graph.facebook.com/[page-name]/feed?auth_token=[auth_token_received from facebook]
but I am unable to search for posts that are on my page and have specified text. Is there a way to achieve this

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 do I search for a page's posts with the Graph API?

What I have:
The ID of a Facebook page.
A search string.
What I need returned:
A list of the URLs or identifiers of posts that match the search string.
I am looking for a particular parameter combination that will work for any Facebook page. What is the form of such a URL? Will it work in the Graph Explorer?
There is no post search. You can only go through all posts on the page (page-id/feed) and search for the string on your own.
https://developers.facebook.com/docs/graph-api/reference/v2.6/page/feed

Facebook API - how to retrieve "is_verified" pages?

I'm using Java for searching public page info in Facebook.
I chose for now to use the Facebook4J but this is not a must.
I succeeded to search for pages named "Some Name" and I would like to read the is_verified property of the page to make sure this is the official page I'm looking for and not a faked one.
There is no isVerified() method on Page object and I do not how to run a FQL query using the search API.
This FQL runs well in Facebook simulator:
select page_id, name, is_verified, is_community_page
from page
where name='Tom Cruise' and is_verified=1
The Java code I'm having right now is this:
ResponseList<Page> pages = facebook.searchPages(personName);
I tried copy-paste the FQL into the search as parameter, as the method signature is
ResponseList<Page> searchPages(String query) throws FacebookException;
but I get no results...
I also cannot loop on all 'Tom Cruise' pages and ask whether they are verified or not because, as I mentioned before, there is no 'isVerified()' method on Page.
I'll appreciate any Java solution, even if it means that I should drop Facebook4J for another platform.
The is_verfied page field is added with RestFB version 1.10.0.

Facebook API search for hashtag does not show all the post

I am fetching all public post with specific hashtag. The problem is that the result only shows some of the post but not all.
It is any restrictions or rules in what post are indexed and show in the "search".
I'm using https://graph.facebook.com/search?q=myhashtag&type=post.
What I can see so far is that in the facebook page when I search for the hashtag I have some results and they are different that the ones the api returns.

Retrive location specific posts via application access token

I have a webpage that retrieves facebook posts of a fan page.
The web-page does not require visitors to log in via FBConnect. Instead a Facebook application was created and an application secret was obtained via the following link :
graph.facebook.com/oauth/access_token?client_id=[APP_ID]&client_secret=[CLIENT_SECRET]&grant_type=client_credentials
I am thus able to retrieve posts from the fan page via code-behind(php/.net) with the above application's access_token using the following url :
graph.facebook.com/cocacola/posts?access_token=[APPLICATION_ACCESS_TOKEN]
Problem : I cannot find any location specific posts. By location specific posts, I mean posts that are visible only to people from specific countries.
Has anybody been able to achieve this?
Thanks