criso / fbgraph

NodeJs module to access the facebook graph api
http://criso.github.io/fbgraph/
1.09k stars 177 forks source link

Commit 205ddfde7f883c9a44033caa0ff99f6bed982043 renders get requests unusable #118

Closed kpturner closed 7 years ago

kpturner commented 7 years ago

The get method has been changed in commit 205ddfde7f883c9a44033caa0ff99f6bed982043 to check the response status code. It was

if (err) {

but now it is

if (err || res.statusCode !== 200) {

and that means that many get requests to objects in Facebook now fail.
For example, a successful call to me/picture returns an image with a status code of 302 not 200. These are RESTful APIs so why has a check for status code 200 been added?

I have had to manually correct my local version in order for the code to work.

criso commented 7 years ago

Thanks! - Change reverted