facebook-node-sdk icon indicating copy to clipboard operation
facebook-node-sdk copied to clipboard

GET "/{ID}/picture" causes end of input error.

Open Coderah opened this issue 12 years ago • 1 comments

When using facebook.api("/{ID}/picture") I am receiving the error:

"Error: Parse Graph API server response error: Unexpected end of input" EDIT: completely missed the fact that it is a parsing error, I checked the response variable inside the graph api callback just before it calls JSON.parse and it is equal to ""

The setup is working properly with all other requests, can't track down whats going on.

Coderah avatar Mar 01 '13 06:03 Coderah

This is by design.. Facebook changed the graph api, you have to use field expansion.

https://developers.facebook.com/docs/reference/api/field_expansion/

It will work if you query like so

req.facebook.api('/me', { fields: 'picture.type(normal)' }, ...

briantanner avatar Apr 23 '13 03:04 briantanner