Thuzi / facebook-node-sdk

Modeled from the (Facebook Javascript SDK), now with the facebook-node-sdk you can now easily write the same code and share between your server (nodejs) and the client (Facebook Javascript SDK).
Other
737 stars 250 forks source link

Fields with Parameters? #95

Open PaulAik opened 9 years ago

PaulAik commented 9 years ago

Hi,

Is there a way to submit a request to the Graph API with parameters? E.g. this doesn't work for me:

"me/picture?width=200&height=200&redirect=false"

Seems adding the values on to width and height breaks? I've tried it a few ways with no success.

FB.api('me/picture/', {
      fields: ['width=200','height=200'],
      redirect: false,
      access_token: accessToken
    }, function(result) {
      console.log(result);

    });
aymanosman commented 9 years ago

Do this my friend:

FB.api('me/picture/', {
    width: 200,
    height: 200,
    redirect: false,
    access_token: accessToken
}, function(result) {
    console.log(result);
});