0

Is it possibile to filter results from Graph API Search by number range? When I type:

fields=name,likes&q=mobile&type=page

I get number of fans of each page.

I can also get the number of events attendes:

attending.limit(1).summary(true)

Can I use math operators for this statistics? Ex. to filter pages, that has over 1000 fans? Something like: Fields:likes>100 (it’s my idea, not a code).

Mikołaj
  • 41
  • 2
  • 8

1 Answers1

0

Unfortunately, there are no filters to get specific entries only. You would have to implement paging and do the filtering on your own. Which would be nearly impossible for very large results.

andyrandy
  • 72,880
  • 8
  • 113
  • 130
  • allright, Now I try to get a number of pages. following code "search?fields=name,events&q=(..)&type=page" fetches some events (set is no empty), but this 'search?fields=name,events.limit(1).summary(true)&q=(...)&type=page' doesn't yield a number of events (despite looks correct against structure of results). what's wrong with 'limit(1).summary(true)" ? – Mikołaj Jan 20 '15 at 18:34
  • there´s no mention of this even being possible in the docs. i don´t think it you can use limit and summary in the search api. – andyrandy Jan 20 '15 at 18:41
  • oh, i just tested it. limit does work with the search api, my bad. only summary does not seem to work. you could file a bug though. – andyrandy Jan 20 '15 at 18:44
  • hmm, strangely, I use it to make statistics of events attendes ('attending.limit(1).summary(true) within EVENT node) and it works, this function is often mentioned (ex. here:http://stackoverflow.com/questions/23859556/facebook-graph-api-endpoint-for-getting-likes-shares-comments-for-posts) So on the whole this code seems correct, but only for number of events doesn't work.. ugghhh.... (BTW: i guess there are a lot of methods, that work and aren't mentioned in docs... – Mikołaj Jan 20 '15 at 19:16
  • yeah, that is why i would just file a bug. looks like it "should" work. – andyrandy Jan 20 '15 at 19:26