I am developing a Facebook app where I have multiple (~200) pages and users can ‘like’ them. Based on likes I create a table of best pages.
I am using a REST API to get likes like so:
http://api.ak.facebook.com/restserver.php?v=1.0&method=links.getStats&format=json&urls=%%URL%%
Having up to 75 URLs in a single call plus if total number exceeds 75 I sleep(5) and do a next call until all URLs are passed and responses received. After I sync the ‘like’ amounts to db. This function is going to run with cron ideally every 5 minutes or so.
My question is how often would it be appropriate to make those calls and can Facebook restrict these calls in any way if I exceed some sort of limit (if there is such)?
Any suggestions are welcome.
In the Facebook Platform Policies it states:
So if you plan to exceed that, contact them.
Why are you using the rest api? It has been deprecated and you should switch to the graph api.
Also, the graph api has the Batch Requests feature which will let you aggregate api calls into one request.
Edit
The equivelent for what you’re trying to do (I think) is the use the FQL table link_stat.
Something like: