Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I want to query the new search graph to find all of my friends’ posts which contain some word, say Vacation in Italy.

How can I do it?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

We cannot do this using the Facebook website itself

But Facebook API does let you do that How to do it is explained here:

https://developers.facebook.com/docs/reference/api/search/

One of the websites that has implemented this is: www.openstatussearch.com

[edit]

There are 3 ways of doing this:

Quoting from the link above

We support search for the following types of objects:

All public posts: https://graph.facebook.com/search?q=watermelon&type=post This search type does not support limit/offset paging.

  1. Now develop your own parser for this data. That's one way of doing this.

  2. Using JavaScript SDK https://developers.facebook.com/docs/javascript/gettingstarted/ With the fb.dataquery method. What you want to do is use the stream table to get the status posts for users.

  3. Using PHP SDK (I personally prefer this) https:/developers.facebook.com/docs/php/gettingstarted/ Decode (using json_decode) the json object recevied by this url: https://graph.facebook.com/search?q=Vacation+in+italy&type=post

Update: Version 2.0 of the GraphAPI does not let you search for posts anymore. See the updated documentation.

You can continue to search for posts by changing your API call to:

https://graph.facebook.com/v1.0/search?q=search_query&type=post&access_token={access_token}
share|improve this answer
    
Could you say a bit more about how it's done as per your link? –  batpigandme Jun 14 '13 at 1:25
    
@batpigandme: Sure, I've edited the post now –  Rishi Dua Jun 14 '13 at 1:42
    
Well done and welcome to SE! –  batpigandme Jun 14 '13 at 4:51
    
Thank you so much! I can add the links now –  Rishi Dua Jun 14 '13 at 4:53
    
(Note that the quoted example from the v1.0 API has since been deprecated.) –  tedmiston Aug 29 at 20:26

Update 30/09/2013: This is now possible from the Facebook search (Graph Search).

Starting today, Graph Search will include posts and status updates. Now you will be able to search for status updates, photo captions, check-ins and comments to find things shared with you.

Source.


The post search is not yet supported, so for the time being you can’t do this.

enter image description here

What you could do is to try searching for something like Friends who have been to Italy or Friends who have been to Italy and posted photos taken in Italy. I know, it’s not the same, but it’s the only available option at the moment.

Update: this feature will be implemented in the future, but it’s unknown when will it become available.

Finally, we are also working on building a completely new vertical to handle searching posts and comments.

Source. (It’s buried towards the end of the post.)

share|improve this answer
    
how about searching friends who post apartments for rent in Tel-Aviv? –  Elad Benda Mar 10 '13 at 10:09
    
I don’t think it’s possible at the moment, since you can’t search inside the posts. (And I’m not aware of any related Open Graph verb regarding rentals.) –  Alex Mar 10 '13 at 10:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.