且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何获得Facebook页面的更大的个人资料图片

更新时间:2023-12-02 18:20:52

一般来说,如果你想收集一个用户或页面,图标大小图片的格式为:

  http://graph.facebook.com/ [页面ID / profile id] / picture 

和大图:

  http://graph.facebook.com/ [page id / profile id] / picture?type = large 
/ pre>

编辑要点:$ b​​ $ b如果保存在Facebook服务器上的图像小于200 * 200的尺寸,您将获得图像作为最高分辨率,例如:128 * 160。您可以使用GD库调整大小。



另一个更重要



Facebook支持200 * 600像素作为配置文件图片的最高分辨率。



*截至2017年2月19日的更新*

>

我们需要使用这个新的URL格式来获取所需的配置文件图像。

  http://graph.facebook.com/ {profile_id} / picture?width = {number}& height = {number} 

[谢谢 https://***.com/users/2829128/vay]


I am getting an image from facebook by the URL: http://external.ak.fbcdn.net/safe_image.php?d=d282e1e7c86c9270232f97ddc737df39&w=90&h=90&url=http%3A%2F%2Fi52.tinypic.com%2F2q0ixzl.jpg

Now, I want a bigger version, like 200 by 200. Is there a URL for that? If not, how can I convert this image to a larger size?

Generally if you want to collect the profile pic of a user or page, the format for the icon size picture is:

http://graph.facebook.com/[page id/profile id]/picture

and for the large picture:

http://graph.facebook.com/[page id/profile id]/picture?type=large

EDIT Points to note: If the image stored on the facebook servers is less than the 200*200 dimensions, you would get the image as the highest resolution avaiable eg: 128*160. Either you can resize it using the GD library.

AND ONE MORE THING

Facebook supports 200*600px as the highest resolution for the profile pic. It will resize an image to fit into these dimensions by maintaining the aspect ratio.

*UPDATE as on 19th Feb, 2017 *

We need to use this new URL formation to get a desired profile image.

http://graph.facebook.com/{profile_id}/picture?width={number‌​}&height={number}

[Thank you https://***.com/users/2829128/vay]