How do I search public status updates within a certain location? - facebook

I'm trying to figure out the Graph API, and would like to be able to search through public status updates for specific strings, but only if the status originated from a certain city/place/location. Is this possible? I was thinking if I could find the place_id of a venue or location then I could search the 'status' DB table from there, but I have not been able to figure out the correct search key for that.

Facebook says:
Status search type does not support limit/offset paging.
So the answer would be no, at this time it is not possible to limit to a certain location.
Source https://developers.facebook.com/docs/reference/api/search/

Related

Specify certain values with Facebook Graph request

I was wondering if there's a method to specify certain values of for instance "story" or "name" field when doing a request to the facebook graph. What I'm looking for is something like the following:
/{id}/feed?q={bla}&type={story}
Where I want to check a specific person/page's feed on a certain string of text within each story returned.
Hope you can help me out.
No, that is not possible.
Filtering and searching capabilities of the Graph API are very rudimentary.
When any endpoints support additional parameters of that sort, it is usually mentioned in the documentation.
But there is no way to filter a person’s or page’s feed for specific story types and message contents.

Retrurning extra fields using the facebook search API

I'm using the facebook graph API to search for all public business within a certain range based on location. I want to return some extra fields, specifically the 'hours of business' but can't see how I can do this?
`search?q=&type=place&center=-33.8650,151.2094&distance=5000'
I realize you can add extra fields in the graph API tool but that is only for things that you have a connection to. Whereas I want to query all 'public' businesses therefore it looks like I'm restricted to use the search functionality
You can use the fields parameter to specify fields you want to see... search?q=&type=place&center=-33.8650,151.2094&distance=5000&fields=hours

Query near public events via Facebook API v2.2

I want to retrieve a list of upcoming public events in my hometown from the Facebook Graph API.
I already know that FQL is deprecated and that I can query by keywords using a statement similar to
/v2.2/search?type=event&q=Berlin&since=2015-01-27
However, this list is not enough because there are lots of events which do not contain the City Name either in the event title, description or Location name.
On the other hand I can retrieve a list of places within the same City by using
/v2.2/search?type=place&since=2015-01-27&center=52.52,13.41&distance=10000
In my assumption I could retrieve a better event list if I create a query stating "give me all public events (eid) of all given places within this city in a specified distance".
Does anybody know if this is somehow possible to query?
I am unsure if batch processing is the right way to go, or if there is another possibility to Combine These two entities. My simple Approach would be to query each given Place again by requesting
/v2.2/{placeid}/events
but I also know that Facebook has a rate Limit of 50 requests in this case.
Right now Facebook doesn't have a way to do what you want or at least not documented.
The only way I think you could it is:
1- Find with the facebook API the pages in one city. (You can do do this manually or search for places near the city and then use the places that also ara pages)
2- Get the events of the pages (if exists) and save this in a db also with the location of the place/page.
3- Show all the events of the city.

Facebook API Multiple Search Type

Hi and thanks in advance.
I am currently working with the Facebook API, and I want to incorporate the search feature in my system, but the only problem is that I would like to do a search with one or more keywords for one or more type of object.
In other words not only search for posts but also, I would like to be able to search for posts, users and probably even events.
I have tried to put the parameter type like following type='post,user' but it doesn't return anything, the result is empty.
Is there a way to do it? The Facebook API manual doesn't say much about the search.

facebook public posts filtered by country

I'm using the facebook search API to get public posts. I want to filter it by country from which it was posted from. The place search graph api has a way to do this - by appending center and distance as query parameters. But the search api for type 'posts' does not respond to center or distance query parameters. I've looked into this SO question as well, but none of the answers have helped me accomplish my task.
As of now, the only solution I can think of is using a library to figure out the locale from the post string itself.
Note: I also thought of getting the user's location and then doing my own filtering, but that doesn't work either because I don't have the permissions to view the location/hometown of the user.
Anybody done this before?
https://developers.facebook.com/docs/reference/fql/location_post/ shows how you can read posts with location information. If that's not available, you could use the locale information in the User object from the Graph API, but that's not always visible/available either. Language detection (as you suggested in the question) may not be a great idea unless you have very specific needs. But, if the post language is in English, it's nearly impossible to tell the location considering the popularity of the language around the world.