Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Graph Api, limit and/or order?

Is it possible to limit/filter FB Graph (page) requests to :

  1. The category (of the page)? (for instance &category=restaurant)
  2. The number of likes it has (minimum threshold)
  3. Whether it has certain properties (for instance it must have a location.city or maybe filter where location.city == "San Jose")

and is it possible to order results (for instance by number of likes descending?)

I'm using this as a starting point:

http://graph.facebook.com/search?q=california&type=page&fields=id,name,location,category
like image 735
StackOverflowed Avatar asked Nov 22 '12 23:11

StackOverflowed


People also ask

What is Facebook API rate limit?

A rate limit is the number of API calls an app or user can make within a given time period. If this limit is exceeded or if CPU or total time limits are exceeded, the app or user may be throttled.

What 3 terms does Facebook use to describe what the graph API is composed of?

The Graph API is named after the idea of a "social graph" — a representation of the information on Facebook. It's composed of nodes, edges, and fields.

How do I fix the API rate limit exceeded?

Resolve a 403 error: Project rate limit exceededRaise the per-user quota in the Google Cloud project. For more information, request a quota increase. Batch requests to make fewer API calls. Use exponential backoff to retry the request.


1 Answers

Facebook graph api returns the latest object first. and unfortunately, you cannot order the sequence of the return. API does do their best, by calculating relativity through their own logic.

  1. limit : number of objects to be returned
  2. offset : starting point of the result

There is no order by ascending or descending.

You can use FQL for some objects, but that does not applies to search.

To know if it is supported not, simply enter the url to the browser and look at the bottom paging section. Most of supported parameters are there.

http://graph.facebook.com/search?fields=id,name,location,category&q=california&limit=2&type=page

   "paging": {
      "next": "http://graph.facebook.com/search?fields=id,name,location,category&q=california&limit=2&type=page&offset=2&__after_id=108131585873862"
   }
like image 133
allenhwkim Avatar answered Nov 05 '22 07:11

allenhwkim