以个人资料照片的大小获取用户的照片 [英] Get a user's photo in the size of the profile photo
问题描述
FacebookClient FBApp = new FacebookClient(getAccessToken);
dynamic user = FBApp.Get(/ me);
我可以通过以下方式获取用户的朋友:
动态朋友= FBApp.Get(/ me / friends);
所有这一切都不包含任何指向照片的链接。我可以使用链接获取用户照片 https://graph.facebook.com/ * [user_id] * /图片。
但是这显示了一张非常小的照片...我如何获得的照片尺寸与配置文件照片的大小相似?
要获取特定大小的用户个人资料图片,请致电
https://graph.facebook.com/USER_ID/picture?type=SIZE
其中SIZE应替换为
square
small
normal
large
取决于你想要的大小。
此呼叫将返回一个 URL 到单个图像,其大小取决于您选择的类型参数。
例如:
https://图.facebook.com / USER_ID / picture?type = large
将URL转换为大版本的图像。
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?
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.
这篇关于以个人资料照片的大小获取用户的照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!