Closed wanderson-ra closed 6 years ago
Hi, do you mean profile picture? if so then you can adjust height (autoscale-wise) by adding parameter
https://graph.facebook.com/{app-scoped-user-id}/picture?height=640
Let me know if i misunderstood your issue please.
The following code does not return an image URL:
var profileFacebookDict = await _facebookClient.RequestUserDataAsync ( new [] {"picture? height = 640", "email", "first_name", "last_name", "birthday" new [] {"email", "user_birthday"});
How do I return the URL of the full size image?
Well i'm not quite sure if you can set parameters after question mark in that string array.
But here is what you can do. If you just want profile picture URL of required app-user-id you can request id
too in your Request and then use this api call to retrieve either json or redirect to jpg profile picture of your desired width/height ratio
https://graph.facebook.com/123456789}/picture?height=640
You can also use call below to retrieve json array with picture path instead of redirected jpg
https://graph.facebook.com/123456789/picture?height=640&json=true
The suggestion from @TimotejRybar might be the simpler way to do it.
If you want to use the plugin can do it this way:
await CrossFacebookClient.Current.QueryDataAsync("{user-id}/picture?height=640&json=true", new string[]{ "public_profile"});
or for the current user:
await CrossFacebookClient.Current.QueryDataAsync("me/picture?height=640&json=true", new string[]{ "public_profile"});
Can not obey the full size image. The "picture.type (large)" parameter returns empty. Only the small image with the "picture" parameter is returned.