facebook-node-sdk
facebook-node-sdk copied to clipboard
Unable to retrieve facebook response headers
Facebook responses include set of very useful headers, but these are unreachable by this library.
Header x-page-usage is returned whenever your page access token is about to be rate-limited (warning). When any of returned metrics exceeds 100(%), all requests with this token fail. To be able to schedule / scale requests, an application must be able to read x-page-usage header from client.
Facebook headers looks like this:
x-fb-debug:P5opAiBX...==
x-fb-rev:2440951
x-fb-trace-id:CM4d8Rx7cCs
x-page-usage:{"call_count":855,"total_cputime":202,"total_time":911}
I propose a new option 'response_headers'. When set to true, response object will include response_headers property with response headers.