-1

I'm trying to get events in Facebook that have a certain phrase or description in them. I'd like to not have the results filtered or limited, as the phrase is fairly specific.

As an example, the phrase I'm looking for is "UMvC3" (short for Ultimate Marvel vs. Capcom 3).

That said, I could run an FQL query (and subsequently enrich with a call to the Graph API, like so):

select eid from event where contains("umvc3") and start_time >= now() 
order by update_time desc

This will give me upcoming events with "umvc3" in them as well as only ones occurring in the future (I'm not concerned with past events).

However, the selection is severely limited. For example, the following isn't returned in the search results:

https://www.facebook.com/events/595137740538545/

It clearly has "umvc3" in the description text.

I can perform a search using the Graph API, but that doesn't return the above result either. Additionally, I can't filter using the Graph API on the start_time or order the results in a manner where I can stop processing the result set once I get to a certain point.

Finally, there is the Public Feed API, which will give me the entire firehose (which isn't filterable, like Twitter's, unfortunately), so I'll have to filter in real-time, which could be near impossible.

That said, am I approaching this the wrong way, or is there no way to really get a comprehensive, exact set of results from the Facebook API for events?

Note: I'm using the access_token provided by the Graph Explorer in the tools section.

casperOne
  • 73,706
  • 19
  • 184
  • 253

1 Answers1

4

The description column of Event FQL table isn't indexable, thus the freestyle search on not indexable columns won't give any result.

The results you see by running the query you suggested gives only events where the 'umvc3' is in the name column, which is indexable.

The only option is to ask facebook for fulltext indexing this column which apparently won't happen. They surely won't open any column for using clause like 'LIKE' since the query execution will take a lot of time.

And the answer from Facebook developer: https://stackoverflow.com/a/5824449/334522

Community
  • 1
  • 1
sromku
  • 4,663
  • 1
  • 36
  • 37
  • So basically, FQL can only filter on the `name` column, and the `q` parameter in the Graph API is ambiguous? – casperOne Oct 06 '13 at 17:22
  • The search API with `q` parameter is just another more nicer level above FQL. It doesn't add any additional features and it only gives common FQL requests like *find me all events that talk about 'something'*. Mainly to encourage easy facebook integration in apps. Thus, it doesn't change the fact that you can't search in description text content. By running `/search?limit=1000&type=event&q=umvc3` you will get events that contain `umvc3` in the `name` field (or very close to this string). – sromku Oct 06 '13 at 18:06
  • Even by specifying `description` field by this: `search?limit=1000&type=event&q=umvc3&fields=description`, the underground search query will still do the matching of the string on indexable columns only. – sromku Oct 06 '13 at 18:10
  • And yes, in Event table, the string 'filtering' will work on `name` column only. – sromku Oct 06 '13 at 18:15