Reputation: 93
I'm developing website Facebook application using C#. I can get the information using:
FacebookClient FBApp = new FacebookClient(getAccessToken);
dynamic user = FBApp.Get("/me");
and I can get a user's friends by:
dynamic friends = FBApp.Get("/me/friends");
All this does not contain any links to the photo. I can get the user photo using the link https://graph.facebook.com/*[user_id]*/picture.
But this shows a very small photo... How can I get the photo in a size similar to the size of the profile photo?
Upvotes: 3
Views: 7102
Reputation: 1
To get a facebook user profile picture of a specific size, call
graph.facebook.com/USER_ID/picture?width=900
Upvotes: 0
Reputation: 1
You can get picture by this way: https://graph.facebook.com/v2.2/search?fields=id,picture&q={your query}&type=user&access_token=AccessToken
Upvotes: -1
Reputation: 2776
@Gunnar Karlsson is true, but the sizes (in pixels) of pictures are not the same. For example, 180x180;180x135. The aspect depends on the original uploaded picture
Upvotes: 0
Reputation: 28480
To get a user profile picture of a specific size, call
https://graph.facebook.com/USER_ID/picture?type=SIZE
where SIZE should be replaced with one of the words
square
small
normal
large
depending on the size you want.
This call will return a URL to a single image with its size based on your chosen type parameter.
For example:
https://graph.facebook.com/USER_ID/picture?type=large
returns a URL to a large version of the image.
Upvotes: 15
Reputation: 2434
Try FQL:
SELECT pic_square FROM user WHERE uid IN(SELECT uid2 FROM friend WHERE uid1 = me())
...where pic_square
can be one of pic_small
, pic_big
, pic_square
, pic
That'll give you URLs for the corresponding user's friends' profile picture at the given size.
e.g.:
Upvotes: 0