Skip to Content
Facebook® Application Development For Dummies®
book

Facebook® Application Development For Dummies®

by Jesse Stay
May 2011
Beginner
408 pages
10h 27m
English
For Dummies
Content preview from Facebook® Application Development For Dummies®

Dealing with Rate Limits

If an API change doesn't get you, rate limits will. You'll probably only notice them if you're getting or sending any sort of traffic to or from Facebook.

image A rate limit is a cap on the number of requests you can make to an API within a given time frame. For instance, depending on how often your app hits Facebook's API, they might keep you from accessing it very often. As I write this, Facebook returns a 600-transactions-per-600-seconds limit. You can't post any more than 600 requests in a 600-second time frame, per this rate limit. Rate limits keep developers from causing too much strain on Facebook's servers, and avoid spam among the Facebook user base. Unfortunately, Facebook doesn't publish the exact method of how it limits API calls. This is something you have to detect by reading the errors Facebook sends back to your application and handling them accordingly. You may also want to do some logging, so you can log the various rate limits your application may be hitting in order to adapt your application to meet those limits.

It is best to set some hard limits on your own and ensure that you don't exceed those limits. You could set it so that your application only posts to Facebook Platform 500 times in every 600-second time frame, for instance. It will be up to you to detect how often your application makes API calls and throttle that to a reasonable ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Programming Social Applications

Programming Social Applications

Jonathan LeBlanc

Publisher Resources

ISBN: 9780470768730Purchase book