Last Updated: February 25, 2016
·
983
· weyus

Beware default timeout of Node.js 'facebook-client' module

The Node.js 'facebook-client' module has a default timeout of 10s for requests to the Facebook Graph API. This is often not enough time. It is a good idea to jump this up to 30s, like so:

new FacebookClient(this.appId, this.appSecret, {timeout: 30000});

This will override the default 10000ms (10 s) timeout and replace it with a 30s timeout.