0

I'm using the js SDK and after the user has login in with FB I want to request the email, first name, last name and picture (a link to the picture).

This works:

FB.api('/me?fields=email,first_name,last_name',
  (graph_response) ->
    ...
)

This also works, but the picture I get is super small (the same one that if I request type=square at /me/picture):

FB.api('/me?fields=email,first_name,last_name,picture',
  (graph_response) ->
    ...
)

I know I can get a larger profile picture (big enough) doing this call:

FB.api('/me/picture?type=large&redirect=false',
  (graph_response) ->
    ...
)

Is there a way I can combine both in just one request? I have tried /me?fields=email,first_name,last_name,picture&type=large with no luck.

moondaisy
  • 4,303
  • 6
  • 41
  • 70

1 Answers1

1

This works:

/me?fields=email,first_name,last_name,picture.type(large)

Alternatively, you can specifiy the sizes:

/me?fields=email,first_name,last_name,picture.width(100).height(100)

More information: https://stackoverflow.com/a/27006154/757508

andyrandy
  • 72,880
  • 8
  • 113
  • 130